1#![doc = "MAVLink uAvionix dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12 bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32 #[doc = "Do nothing."]
33 ACTUATOR_CONFIGURATION_NONE = 0,
34 #[doc = "Command the actuator to beep now."]
35 ACTUATOR_CONFIGURATION_BEEP = 1,
36 #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37 ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38 #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39 ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40 #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41 ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42 #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43 ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46 pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49 fn default() -> Self {
50 Self::DEFAULT
51 }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62 #[doc = "No function (disabled)."]
63 ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64 #[doc = "Motor 1"]
65 ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66 #[doc = "Motor 2"]
67 ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68 #[doc = "Motor 3"]
69 ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70 #[doc = "Motor 4"]
71 ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72 #[doc = "Motor 5"]
73 ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74 #[doc = "Motor 6"]
75 ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76 #[doc = "Motor 7"]
77 ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78 #[doc = "Motor 8"]
79 ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80 #[doc = "Motor 9"]
81 ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82 #[doc = "Motor 10"]
83 ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84 #[doc = "Motor 11"]
85 ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86 #[doc = "Motor 12"]
87 ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88 #[doc = "Motor 13"]
89 ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90 #[doc = "Motor 14"]
91 ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92 #[doc = "Motor 15"]
93 ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94 #[doc = "Motor 16"]
95 ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96 #[doc = "Servo 1"]
97 ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98 #[doc = "Servo 2"]
99 ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100 #[doc = "Servo 3"]
101 ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102 #[doc = "Servo 4"]
103 ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104 #[doc = "Servo 5"]
105 ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106 #[doc = "Servo 6"]
107 ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108 #[doc = "Servo 7"]
109 ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110 #[doc = "Servo 8"]
111 ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112 #[doc = "Servo 9"]
113 ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114 #[doc = "Servo 10"]
115 ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116 #[doc = "Servo 11"]
117 ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118 #[doc = "Servo 12"]
119 ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120 #[doc = "Servo 13"]
121 ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122 #[doc = "Servo 14"]
123 ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124 #[doc = "Servo 15"]
125 ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126 #[doc = "Servo 16"]
127 ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130 pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133 fn default() -> Self {
134 Self::DEFAULT
135 }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146 #[doc = "Altitude reported from a Baro source using QNH reference"]
147 ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148 #[doc = "Altitude reported from a GNSS source"]
149 ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152 pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155 fn default() -> Self {
156 Self::DEFAULT
157 }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168 ADSB_EMITTER_TYPE_NO_INFO = 0,
169 ADSB_EMITTER_TYPE_LIGHT = 1,
170 ADSB_EMITTER_TYPE_SMALL = 2,
171 ADSB_EMITTER_TYPE_LARGE = 3,
172 ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173 ADSB_EMITTER_TYPE_HEAVY = 5,
174 ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175 ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176 ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177 ADSB_EMITTER_TYPE_GLIDER = 9,
178 ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179 ADSB_EMITTER_TYPE_PARACHUTE = 11,
180 ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181 ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182 ADSB_EMITTER_TYPE_UAV = 14,
183 ADSB_EMITTER_TYPE_SPACE = 15,
184 ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185 ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186 ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187 ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190 pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193 fn default() -> Self {
194 Self::DEFAULT
195 }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199 pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202 fn default() -> Self {
203 Self::DEFAULT
204 }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Airspeed sensor flags"] pub struct AirspeedSensorFlags : u8 { # [doc = "Airspeed sensor is unhealthy"] const AIRSPEED_SENSOR_UNHEALTHY = 1 ; # [doc = "True if the data from this sensor is being actively used by the flight controller for guidance, navigation or control."] const AIRSPEED_SENSOR_USING = 2 ; } }
207impl AirspeedSensorFlags {
208 pub const DEFAULT: Self = Self::AIRSPEED_SENSOR_UNHEALTHY;
209}
210impl Default for AirspeedSensorFlags {
211 fn default() -> Self {
212 Self::DEFAULT
213 }
214}
215bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
216impl AisFlags {
217 pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
218}
219impl Default for AisFlags {
220 fn default() -> Self {
221 Self::DEFAULT
222 }
223}
224#[cfg_attr(feature = "ts", derive(TS))]
225#[cfg_attr(feature = "ts", ts(export))]
226#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
228#[cfg_attr(feature = "serde", serde(tag = "type"))]
229#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
230#[repr(u32)]
231#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
232pub enum AisNavStatus {
233 #[doc = "Under way using engine."]
234 AIS_NAV_STATUS_UNDER_WAY = 0,
235 AIS_NAV_STATUS_ANCHORED = 1,
236 AIS_NAV_STATUS_UN_COMMANDED = 2,
237 AIS_NAV_STATUS_RESTRICTED_MANOEUVERABILITY = 3,
238 AIS_NAV_STATUS_DRAUGHT_CONSTRAINED = 4,
239 AIS_NAV_STATUS_MOORED = 5,
240 AIS_NAV_STATUS_AGROUND = 6,
241 AIS_NAV_STATUS_FISHING = 7,
242 AIS_NAV_STATUS_SAILING = 8,
243 AIS_NAV_STATUS_RESERVED_HSC = 9,
244 AIS_NAV_STATUS_RESERVED_WIG = 10,
245 AIS_NAV_STATUS_RESERVED_1 = 11,
246 AIS_NAV_STATUS_RESERVED_2 = 12,
247 AIS_NAV_STATUS_RESERVED_3 = 13,
248 #[doc = "Search And Rescue Transponder."]
249 AIS_NAV_STATUS_AIS_SART = 14,
250 #[doc = "Not available (default)."]
251 AIS_NAV_STATUS_UNKNOWN = 15,
252}
253impl AisNavStatus {
254 pub const DEFAULT: Self = Self::AIS_NAV_STATUS_UNDER_WAY;
255}
256impl Default for AisNavStatus {
257 fn default() -> Self {
258 Self::DEFAULT
259 }
260}
261#[cfg_attr(feature = "ts", derive(TS))]
262#[cfg_attr(feature = "ts", ts(export))]
263#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
265#[cfg_attr(feature = "serde", serde(tag = "type"))]
266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
267#[repr(u32)]
268#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
269pub enum AisType {
270 #[doc = "Not available (default)."]
271 AIS_TYPE_UNKNOWN = 0,
272 AIS_TYPE_RESERVED_1 = 1,
273 AIS_TYPE_RESERVED_2 = 2,
274 AIS_TYPE_RESERVED_3 = 3,
275 AIS_TYPE_RESERVED_4 = 4,
276 AIS_TYPE_RESERVED_5 = 5,
277 AIS_TYPE_RESERVED_6 = 6,
278 AIS_TYPE_RESERVED_7 = 7,
279 AIS_TYPE_RESERVED_8 = 8,
280 AIS_TYPE_RESERVED_9 = 9,
281 AIS_TYPE_RESERVED_10 = 10,
282 AIS_TYPE_RESERVED_11 = 11,
283 AIS_TYPE_RESERVED_12 = 12,
284 AIS_TYPE_RESERVED_13 = 13,
285 AIS_TYPE_RESERVED_14 = 14,
286 AIS_TYPE_RESERVED_15 = 15,
287 AIS_TYPE_RESERVED_16 = 16,
288 AIS_TYPE_RESERVED_17 = 17,
289 AIS_TYPE_RESERVED_18 = 18,
290 AIS_TYPE_RESERVED_19 = 19,
291 #[doc = "Wing In Ground effect."]
292 AIS_TYPE_WIG = 20,
293 AIS_TYPE_WIG_HAZARDOUS_A = 21,
294 AIS_TYPE_WIG_HAZARDOUS_B = 22,
295 AIS_TYPE_WIG_HAZARDOUS_C = 23,
296 AIS_TYPE_WIG_HAZARDOUS_D = 24,
297 AIS_TYPE_WIG_RESERVED_1 = 25,
298 AIS_TYPE_WIG_RESERVED_2 = 26,
299 AIS_TYPE_WIG_RESERVED_3 = 27,
300 AIS_TYPE_WIG_RESERVED_4 = 28,
301 AIS_TYPE_WIG_RESERVED_5 = 29,
302 AIS_TYPE_FISHING = 30,
303 AIS_TYPE_TOWING = 31,
304 #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
305 AIS_TYPE_TOWING_LARGE = 32,
306 #[doc = "Dredging or other underwater ops."]
307 AIS_TYPE_DREDGING = 33,
308 AIS_TYPE_DIVING = 34,
309 AIS_TYPE_MILITARY = 35,
310 AIS_TYPE_SAILING = 36,
311 AIS_TYPE_PLEASURE = 37,
312 AIS_TYPE_RESERVED_20 = 38,
313 AIS_TYPE_RESERVED_21 = 39,
314 #[doc = "High Speed Craft."]
315 AIS_TYPE_HSC = 40,
316 AIS_TYPE_HSC_HAZARDOUS_A = 41,
317 AIS_TYPE_HSC_HAZARDOUS_B = 42,
318 AIS_TYPE_HSC_HAZARDOUS_C = 43,
319 AIS_TYPE_HSC_HAZARDOUS_D = 44,
320 AIS_TYPE_HSC_RESERVED_1 = 45,
321 AIS_TYPE_HSC_RESERVED_2 = 46,
322 AIS_TYPE_HSC_RESERVED_3 = 47,
323 AIS_TYPE_HSC_RESERVED_4 = 48,
324 AIS_TYPE_HSC_UNKNOWN = 49,
325 AIS_TYPE_PILOT = 50,
326 #[doc = "Search And Rescue vessel."]
327 AIS_TYPE_SAR = 51,
328 AIS_TYPE_TUG = 52,
329 AIS_TYPE_PORT_TENDER = 53,
330 #[doc = "Anti-pollution equipment."]
331 AIS_TYPE_ANTI_POLLUTION = 54,
332 AIS_TYPE_LAW_ENFORCEMENT = 55,
333 AIS_TYPE_SPARE_LOCAL_1 = 56,
334 AIS_TYPE_SPARE_LOCAL_2 = 57,
335 AIS_TYPE_MEDICAL_TRANSPORT = 58,
336 #[doc = "Noncombatant ship according to RR Resolution No. 18."]
337 AIS_TYPE_NONECOMBATANT = 59,
338 AIS_TYPE_PASSENGER = 60,
339 AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
340 AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
341 AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
342 AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
343 AIS_TYPE_PASSENGER_RESERVED_1 = 65,
344 AIS_TYPE_PASSENGER_RESERVED_2 = 66,
345 AIS_TYPE_PASSENGER_RESERVED_3 = 67,
346 AIS_TYPE_PASSENGER_RESERVED_4 = 68,
347 AIS_TYPE_PASSENGER_UNKNOWN = 69,
348 AIS_TYPE_CARGO = 70,
349 AIS_TYPE_CARGO_HAZARDOUS_A = 71,
350 AIS_TYPE_CARGO_HAZARDOUS_B = 72,
351 AIS_TYPE_CARGO_HAZARDOUS_C = 73,
352 AIS_TYPE_CARGO_HAZARDOUS_D = 74,
353 AIS_TYPE_CARGO_RESERVED_1 = 75,
354 AIS_TYPE_CARGO_RESERVED_2 = 76,
355 AIS_TYPE_CARGO_RESERVED_3 = 77,
356 AIS_TYPE_CARGO_RESERVED_4 = 78,
357 AIS_TYPE_CARGO_UNKNOWN = 79,
358 AIS_TYPE_TANKER = 80,
359 AIS_TYPE_TANKER_HAZARDOUS_A = 81,
360 AIS_TYPE_TANKER_HAZARDOUS_B = 82,
361 AIS_TYPE_TANKER_HAZARDOUS_C = 83,
362 AIS_TYPE_TANKER_HAZARDOUS_D = 84,
363 AIS_TYPE_TANKER_RESERVED_1 = 85,
364 AIS_TYPE_TANKER_RESERVED_2 = 86,
365 AIS_TYPE_TANKER_RESERVED_3 = 87,
366 AIS_TYPE_TANKER_RESERVED_4 = 88,
367 AIS_TYPE_TANKER_UNKNOWN = 89,
368 AIS_TYPE_OTHER = 90,
369 AIS_TYPE_OTHER_HAZARDOUS_A = 91,
370 AIS_TYPE_OTHER_HAZARDOUS_B = 92,
371 AIS_TYPE_OTHER_HAZARDOUS_C = 93,
372 AIS_TYPE_OTHER_HAZARDOUS_D = 94,
373 AIS_TYPE_OTHER_RESERVED_1 = 95,
374 AIS_TYPE_OTHER_RESERVED_2 = 96,
375 AIS_TYPE_OTHER_RESERVED_3 = 97,
376 AIS_TYPE_OTHER_RESERVED_4 = 98,
377 AIS_TYPE_OTHER_UNKNOWN = 99,
378}
379impl AisType {
380 pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
381}
382impl Default for AisType {
383 fn default() -> Self {
384 Self::DEFAULT
385 }
386}
387bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
388impl AttitudeTargetTypemask {
389 pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
390}
391impl Default for AttitudeTargetTypemask {
392 fn default() -> Self {
393 Self::DEFAULT
394 }
395}
396#[cfg_attr(feature = "ts", derive(TS))]
397#[cfg_attr(feature = "ts", ts(export))]
398#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
400#[cfg_attr(feature = "serde", serde(tag = "type"))]
401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
402#[repr(u32)]
403#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE. Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
404pub enum AutotuneAxis {
405 #[doc = "Autotune roll axis."]
406 AUTOTUNE_AXIS_ROLL = 1,
407 #[doc = "Autotune pitch axis."]
408 AUTOTUNE_AXIS_PITCH = 2,
409 #[doc = "Autotune yaw axis."]
410 AUTOTUNE_AXIS_YAW = 4,
411}
412impl AutotuneAxis {
413 pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
414}
415impl Default for AutotuneAxis {
416 fn default() -> Self {
417 Self::DEFAULT
418 }
419}
420bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; # [doc = "Camera supports Moving Target Indicators (MTI) on the camera view (using MAV_CMD_CAMERA_START_MTI)."] const CAMERA_CAP_FLAGS_HAS_MTI = 8192 ; } }
421impl CameraCapFlags {
422 pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
423}
424impl Default for CameraCapFlags {
425 fn default() -> Self {
426 Self::DEFAULT
427 }
428}
429#[cfg_attr(feature = "ts", derive(TS))]
430#[cfg_attr(feature = "ts", ts(export))]
431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
433#[cfg_attr(feature = "serde", serde(tag = "type"))]
434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
435#[repr(u32)]
436#[doc = "Camera Modes."]
437pub enum CameraMode {
438 #[doc = "Camera is in image/photo capture mode."]
439 CAMERA_MODE_IMAGE = 0,
440 #[doc = "Camera is in video capture mode."]
441 CAMERA_MODE_VIDEO = 1,
442 #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
443 CAMERA_MODE_IMAGE_SURVEY = 2,
444}
445impl CameraMode {
446 pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
447}
448impl Default for CameraMode {
449 fn default() -> Self {
450 Self::DEFAULT
451 }
452}
453#[cfg_attr(feature = "ts", derive(TS))]
454#[cfg_attr(feature = "ts", ts(export))]
455#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
457#[cfg_attr(feature = "serde", serde(tag = "type"))]
458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
459#[repr(u32)]
460#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
461pub enum CameraSource {
462 #[doc = "Default camera source."]
463 CAMERA_SOURCE_DEFAULT = 0,
464 #[doc = "RGB camera source."]
465 CAMERA_SOURCE_RGB = 1,
466 #[doc = "IR camera source."]
467 CAMERA_SOURCE_IR = 2,
468 #[doc = "NDVI camera source."]
469 CAMERA_SOURCE_NDVI = 3,
470}
471impl CameraSource {
472 pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
473}
474impl Default for CameraSource {
475 fn default() -> Self {
476 Self::DEFAULT
477 }
478}
479#[cfg_attr(feature = "ts", derive(TS))]
480#[cfg_attr(feature = "ts", ts(export))]
481#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
483#[cfg_attr(feature = "serde", serde(tag = "type"))]
484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
485#[repr(u32)]
486#[doc = "Camera tracking modes"]
487pub enum CameraTrackingMode {
488 #[doc = "Not tracking"]
489 CAMERA_TRACKING_MODE_NONE = 0,
490 #[doc = "Target is a point"]
491 CAMERA_TRACKING_MODE_POINT = 1,
492 #[doc = "Target is a rectangle"]
493 CAMERA_TRACKING_MODE_RECTANGLE = 2,
494}
495impl CameraTrackingMode {
496 pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
497}
498impl Default for CameraTrackingMode {
499 fn default() -> Self {
500 Self::DEFAULT
501 }
502}
503bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking status flags"] pub struct CameraTrackingStatusFlags : u8 { # [doc = "Camera is not tracking"] const CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0 ; # [doc = "Camera is tracking"] const CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1 ; # [doc = "Camera tracking in error state"] const CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2 ; # [doc = "Camera Moving Target Indicators (MTI) are active"] const CAMERA_TRACKING_STATUS_FLAGS_MTI = 4 ; # [doc = "Camera tracking target is obscured and is being predicted"] const CAMERA_TRACKING_STATUS_FLAGS_COASTING = 8 ; } }
504impl CameraTrackingStatusFlags {
505 pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
506}
507impl Default for CameraTrackingStatusFlags {
508 fn default() -> Self {
509 Self::DEFAULT
510 }
511}
512bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
513impl CameraTrackingTargetData {
514 pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
515}
516impl Default for CameraTrackingTargetData {
517 fn default() -> Self {
518 Self::DEFAULT
519 }
520}
521#[cfg_attr(feature = "ts", derive(TS))]
522#[cfg_attr(feature = "ts", ts(export))]
523#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
525#[cfg_attr(feature = "serde", serde(tag = "type"))]
526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
527#[repr(u32)]
528#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
529pub enum CameraZoomType {
530 #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
531 ZOOM_TYPE_STEP = 0,
532 #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
533 ZOOM_TYPE_CONTINUOUS = 1,
534 #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
535 ZOOM_TYPE_RANGE = 2,
536 #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
537 ZOOM_TYPE_FOCAL_LENGTH = 3,
538 #[doc = "Zoom value as horizontal field of view in degrees."]
539 ZOOM_TYPE_HORIZONTAL_FOV = 4,
540}
541impl CameraZoomType {
542 pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
543}
544impl Default for CameraZoomType {
545 fn default() -> Self {
546 Self::DEFAULT
547 }
548}
549#[cfg_attr(feature = "ts", derive(TS))]
550#[cfg_attr(feature = "ts", ts(export))]
551#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
553#[cfg_attr(feature = "serde", serde(tag = "type"))]
554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
555#[repr(u32)]
556pub enum CanFilterOp {
557 CAN_FILTER_REPLACE = 0,
558 CAN_FILTER_ADD = 1,
559 CAN_FILTER_REMOVE = 2,
560}
561impl CanFilterOp {
562 pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
563}
564impl Default for CanFilterOp {
565 fn default() -> Self {
566 Self::DEFAULT
567 }
568}
569#[cfg_attr(feature = "ts", derive(TS))]
570#[cfg_attr(feature = "ts", ts(export))]
571#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
573#[cfg_attr(feature = "serde", serde(tag = "type"))]
574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
575#[repr(u32)]
576#[doc = "Possible responses from a CELLULAR_CONFIG message."]
577pub enum CellularConfigResponse {
578 #[doc = "Changes accepted."]
579 CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
580 #[doc = "Invalid APN."]
581 CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
582 #[doc = "Invalid PIN."]
583 CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
584 #[doc = "Changes rejected."]
585 CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
586 #[doc = "PUK is required to unblock SIM card."]
587 CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
588}
589impl CellularConfigResponse {
590 pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
591}
592impl Default for CellularConfigResponse {
593 fn default() -> Self {
594 Self::DEFAULT
595 }
596}
597#[cfg_attr(feature = "ts", derive(TS))]
598#[cfg_attr(feature = "ts", ts(export))]
599#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
601#[cfg_attr(feature = "serde", serde(tag = "type"))]
602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
603#[repr(u32)]
604#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
605pub enum CellularNetworkFailedReason {
606 #[doc = "No error"]
607 CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
608 #[doc = "Error state is unknown"]
609 CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
610 #[doc = "SIM is required for the modem but missing"]
611 CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
612 #[doc = "SIM is available, but not usable for connection"]
613 CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
614}
615impl CellularNetworkFailedReason {
616 pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
617}
618impl Default for CellularNetworkFailedReason {
619 fn default() -> Self {
620 Self::DEFAULT
621 }
622}
623#[cfg_attr(feature = "ts", derive(TS))]
624#[cfg_attr(feature = "ts", ts(export))]
625#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
627#[cfg_attr(feature = "serde", serde(tag = "type"))]
628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
629#[repr(u32)]
630#[doc = "Cellular network radio type"]
631pub enum CellularNetworkRadioType {
632 CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
633 CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
634 CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
635 CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
636 CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
637}
638impl CellularNetworkRadioType {
639 pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
640}
641impl Default for CellularNetworkRadioType {
642 fn default() -> Self {
643 Self::DEFAULT
644 }
645}
646#[cfg_attr(feature = "ts", derive(TS))]
647#[cfg_attr(feature = "ts", ts(export))]
648#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
650#[cfg_attr(feature = "serde", serde(tag = "type"))]
651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
652#[repr(u32)]
653#[doc = "These flags encode the cellular network status"]
654pub enum CellularStatusFlag {
655 #[doc = "State unknown or not reportable."]
656 CELLULAR_STATUS_FLAG_UNKNOWN = 0,
657 #[doc = "Modem is unusable"]
658 CELLULAR_STATUS_FLAG_FAILED = 1,
659 #[doc = "Modem is being initialized"]
660 CELLULAR_STATUS_FLAG_INITIALIZING = 2,
661 #[doc = "Modem is locked"]
662 CELLULAR_STATUS_FLAG_LOCKED = 3,
663 #[doc = "Modem is not enabled and is powered down"]
664 CELLULAR_STATUS_FLAG_DISABLED = 4,
665 #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
666 CELLULAR_STATUS_FLAG_DISABLING = 5,
667 #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
668 CELLULAR_STATUS_FLAG_ENABLING = 6,
669 #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
670 CELLULAR_STATUS_FLAG_ENABLED = 7,
671 #[doc = "Modem is searching for a network provider to register"]
672 CELLULAR_STATUS_FLAG_SEARCHING = 8,
673 #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
674 CELLULAR_STATUS_FLAG_REGISTERED = 9,
675 #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
676 CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
677 #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
678 CELLULAR_STATUS_FLAG_CONNECTING = 11,
679 #[doc = "One or more packet data bearers is active and connected"]
680 CELLULAR_STATUS_FLAG_CONNECTED = 12,
681}
682impl CellularStatusFlag {
683 pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
684}
685impl Default for CellularStatusFlag {
686 fn default() -> Self {
687 Self::DEFAULT
688 }
689}
690#[cfg_attr(feature = "ts", derive(TS))]
691#[cfg_attr(feature = "ts", ts(export))]
692#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
694#[cfg_attr(feature = "serde", serde(tag = "type"))]
695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
696#[repr(u32)]
697#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
698pub enum CompMetadataType {
699 #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
700 COMP_METADATA_TYPE_GENERAL = 0,
701 #[doc = "Parameter meta data."]
702 COMP_METADATA_TYPE_PARAMETER = 1,
703 #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
704 COMP_METADATA_TYPE_COMMANDS = 2,
705 #[doc = "Meta data that specifies external non-MAVLink peripherals."]
706 COMP_METADATA_TYPE_PERIPHERALS = 3,
707 #[doc = "Meta data for the events interface."]
708 COMP_METADATA_TYPE_EVENTS = 4,
709 #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
710 COMP_METADATA_TYPE_ACTUATORS = 5,
711}
712impl CompMetadataType {
713 pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
714}
715impl Default for CompMetadataType {
716 fn default() -> Self {
717 Self::DEFAULT
718 }
719}
720bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used to report computer status."] pub struct ComputerStatusFlags : u16 { # [doc = "Indicates if the system is experiencing voltage outside of acceptable range."] const COMPUTER_STATUS_FLAGS_UNDER_VOLTAGE = 1 ; # [doc = "Indicates if CPU throttling is active."] const COMPUTER_STATUS_FLAGS_CPU_THROTTLE = 2 ; # [doc = "Indicates if thermal throttling is active."] const COMPUTER_STATUS_FLAGS_THERMAL_THROTTLE = 4 ; # [doc = "Indicates if main disk is full."] const COMPUTER_STATUS_FLAGS_DISK_FULL = 8 ; } }
721impl ComputerStatusFlags {
722 pub const DEFAULT: Self = Self::COMPUTER_STATUS_FLAGS_UNDER_VOLTAGE;
723}
724impl Default for ComputerStatusFlags {
725 fn default() -> Self {
726 Self::DEFAULT
727 }
728}
729#[cfg_attr(feature = "ts", derive(TS))]
730#[cfg_attr(feature = "ts", ts(export))]
731#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
733#[cfg_attr(feature = "serde", serde(tag = "type"))]
734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
735#[repr(u32)]
736#[doc = "Engine control options"]
737pub enum EngineControlOptions {
738 #[doc = "Allow starting the engine while disarmed (without changing the vehicle's armed state). This effectively arms just the ICE, without arming the vehicle to start other motors or propellers."]
739 ENGINE_CONTROL_OPTIONS_ALLOW_START_WHILE_DISARMED = 1,
740}
741impl EngineControlOptions {
742 pub const DEFAULT: Self = Self::ENGINE_CONTROL_OPTIONS_ALLOW_START_WHILE_DISARMED;
743}
744impl Default for EngineControlOptions {
745 fn default() -> Self {
746 Self::DEFAULT
747 }
748}
749#[cfg_attr(feature = "ts", derive(TS))]
750#[cfg_attr(feature = "ts", ts(export))]
751#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
753#[cfg_attr(feature = "serde", serde(tag = "type"))]
754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
755#[repr(u32)]
756#[doc = "Indicates the ESC connection type."]
757pub enum EscConnectionType {
758 #[doc = "Traditional PPM ESC."]
759 ESC_CONNECTION_TYPE_PPM = 0,
760 #[doc = "Serial Bus connected ESC."]
761 ESC_CONNECTION_TYPE_SERIAL = 1,
762 #[doc = "One Shot PPM ESC."]
763 ESC_CONNECTION_TYPE_ONESHOT = 2,
764 #[doc = "I2C ESC."]
765 ESC_CONNECTION_TYPE_I2C = 3,
766 #[doc = "CAN-Bus ESC."]
767 ESC_CONNECTION_TYPE_CAN = 4,
768 #[doc = "DShot ESC."]
769 ESC_CONNECTION_TYPE_DSHOT = 5,
770}
771impl EscConnectionType {
772 pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
773}
774impl Default for EscConnectionType {
775 fn default() -> Self {
776 Self::DEFAULT
777 }
778}
779bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
780impl EscFailureFlags {
781 pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
782}
783impl Default for EscFailureFlags {
784 fn default() -> Self {
785 Self::DEFAULT
786 }
787}
788bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
789impl EstimatorStatusFlags {
790 pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
791}
792impl Default for EstimatorStatusFlags {
793 fn default() -> Self {
794 Self::DEFAULT
795 }
796}
797#[cfg_attr(feature = "ts", derive(TS))]
798#[cfg_attr(feature = "ts", ts(export))]
799#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
801#[cfg_attr(feature = "serde", serde(tag = "type"))]
802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
803#[repr(u32)]
804#[doc = "List of possible failure type to inject."]
805pub enum FailureType {
806 #[doc = "No failure injected, used to reset a previous failure."]
807 FAILURE_TYPE_OK = 0,
808 #[doc = "Sets unit off, so completely non-responsive."]
809 FAILURE_TYPE_OFF = 1,
810 #[doc = "Unit is stuck e.g. keeps reporting the same value."]
811 FAILURE_TYPE_STUCK = 2,
812 #[doc = "Unit is reporting complete garbage."]
813 FAILURE_TYPE_GARBAGE = 3,
814 #[doc = "Unit is consistently wrong."]
815 FAILURE_TYPE_WRONG = 4,
816 #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
817 FAILURE_TYPE_SLOW = 5,
818 #[doc = "Data of unit is delayed in time."]
819 FAILURE_TYPE_DELAYED = 6,
820 #[doc = "Unit is sometimes working, sometimes not."]
821 FAILURE_TYPE_INTERMITTENT = 7,
822}
823impl FailureType {
824 pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
825}
826impl Default for FailureType {
827 fn default() -> Self {
828 Self::DEFAULT
829 }
830}
831#[cfg_attr(feature = "ts", derive(TS))]
832#[cfg_attr(feature = "ts", ts(export))]
833#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
835#[cfg_attr(feature = "serde", serde(tag = "type"))]
836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
837#[repr(u32)]
838#[doc = "List of possible units where failures can be injected."]
839pub enum FailureUnit {
840 FAILURE_UNIT_SENSOR_GYRO = 0,
841 FAILURE_UNIT_SENSOR_ACCEL = 1,
842 FAILURE_UNIT_SENSOR_MAG = 2,
843 FAILURE_UNIT_SENSOR_BARO = 3,
844 FAILURE_UNIT_SENSOR_GPS = 4,
845 FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
846 FAILURE_UNIT_SENSOR_VIO = 6,
847 FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
848 FAILURE_UNIT_SENSOR_AIRSPEED = 8,
849 FAILURE_UNIT_SYSTEM_BATTERY = 100,
850 FAILURE_UNIT_SYSTEM_MOTOR = 101,
851 FAILURE_UNIT_SYSTEM_SERVO = 102,
852 FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
853 FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
854 FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
855}
856impl FailureUnit {
857 pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
858}
859impl Default for FailureUnit {
860 fn default() -> Self {
861 Self::DEFAULT
862 }
863}
864#[cfg_attr(feature = "ts", derive(TS))]
865#[cfg_attr(feature = "ts", ts(export))]
866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
868#[cfg_attr(feature = "serde", serde(tag = "type"))]
869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
870#[repr(u32)]
871pub enum FenceBreach {
872 #[doc = "No last fence breach"]
873 FENCE_BREACH_NONE = 0,
874 #[doc = "Breached minimum altitude"]
875 FENCE_BREACH_MINALT = 1,
876 #[doc = "Breached maximum altitude"]
877 FENCE_BREACH_MAXALT = 2,
878 #[doc = "Breached fence boundary"]
879 FENCE_BREACH_BOUNDARY = 3,
880}
881impl FenceBreach {
882 pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
883}
884impl Default for FenceBreach {
885 fn default() -> Self {
886 Self::DEFAULT
887 }
888}
889#[cfg_attr(feature = "ts", derive(TS))]
890#[cfg_attr(feature = "ts", ts(export))]
891#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
892#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
893#[cfg_attr(feature = "serde", serde(tag = "type"))]
894#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
895#[repr(u32)]
896#[doc = "Actions being taken to mitigate/prevent fence breach"]
897pub enum FenceMitigate {
898 #[doc = "Unknown"]
899 FENCE_MITIGATE_UNKNOWN = 0,
900 #[doc = "No actions being taken"]
901 FENCE_MITIGATE_NONE = 1,
902 #[doc = "Velocity limiting active to prevent breach"]
903 FENCE_MITIGATE_VEL_LIMIT = 2,
904}
905impl FenceMitigate {
906 pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
907}
908impl Default for FenceMitigate {
909 fn default() -> Self {
910 Self::DEFAULT
911 }
912}
913#[cfg_attr(feature = "ts", derive(TS))]
914#[cfg_attr(feature = "ts", ts(export))]
915#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
917#[cfg_attr(feature = "serde", serde(tag = "type"))]
918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
919#[repr(u32)]
920#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE. Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2. If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
921pub enum FenceType {
922 #[doc = "Maximum altitude fence"]
923 FENCE_TYPE_ALT_MAX = 1,
924 #[doc = "Circle fence"]
925 FENCE_TYPE_CIRCLE = 2,
926 #[doc = "Polygon fence"]
927 FENCE_TYPE_POLYGON = 4,
928 #[doc = "Minimum altitude fence"]
929 FENCE_TYPE_ALT_MIN = 8,
930}
931impl FenceType {
932 pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
933}
934impl Default for FenceType {
935 fn default() -> Self {
936 Self::DEFAULT
937 }
938}
939#[cfg_attr(feature = "ts", derive(TS))]
940#[cfg_attr(feature = "ts", ts(export))]
941#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
943#[cfg_attr(feature = "serde", serde(tag = "type"))]
944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
945#[repr(u32)]
946#[doc = "These values define the type of firmware release. These values indicate the first version or release of this type. For example the first alpha release would be 64, the second would be 65."]
947pub enum FirmwareVersionType {
948 #[doc = "development release"]
949 FIRMWARE_VERSION_TYPE_DEV = 0,
950 #[doc = "alpha release"]
951 FIRMWARE_VERSION_TYPE_ALPHA = 64,
952 #[doc = "beta release"]
953 FIRMWARE_VERSION_TYPE_BETA = 128,
954 #[doc = "release candidate"]
955 FIRMWARE_VERSION_TYPE_RC = 192,
956 #[doc = "official stable release"]
957 FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
958}
959impl FirmwareVersionType {
960 pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
961}
962impl Default for FirmwareVersionType {
963 fn default() -> Self {
964 Self::DEFAULT
965 }
966}
967bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
968impl GimbalDeviceCapFlags {
969 pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
970}
971impl Default for GimbalDeviceCapFlags {
972 fn default() -> Self {
973 Self::DEFAULT
974 }
975}
976bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
977impl GimbalDeviceErrorFlags {
978 pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
979}
980impl Default for GimbalDeviceErrorFlags {
981 fn default() -> Self {
982 Self::DEFAULT
983 }
984}
985bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
986impl GimbalDeviceFlags {
987 pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
988}
989impl Default for GimbalDeviceFlags {
990 fn default() -> Self {
991 Self::DEFAULT
992 }
993}
994bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
995impl GimbalManagerCapFlags {
996 pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
997}
998impl Default for GimbalManagerCapFlags {
999 fn default() -> Self {
1000 Self::DEFAULT
1001 }
1002}
1003bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1004impl GimbalManagerFlags {
1005 pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1006}
1007impl Default for GimbalManagerFlags {
1008 fn default() -> Self {
1009 Self::DEFAULT
1010 }
1011}
1012#[cfg_attr(feature = "ts", derive(TS))]
1013#[cfg_attr(feature = "ts", ts(export))]
1014#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1016#[cfg_attr(feature = "serde", serde(tag = "type"))]
1017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1018#[repr(u32)]
1019#[doc = "Type of GPS fix"]
1020pub enum GpsFixType {
1021 #[doc = "No GPS connected"]
1022 GPS_FIX_TYPE_NO_GPS = 0,
1023 #[doc = "No position information, GPS is connected"]
1024 GPS_FIX_TYPE_NO_FIX = 1,
1025 #[doc = "2D position"]
1026 GPS_FIX_TYPE_2D_FIX = 2,
1027 #[doc = "3D position"]
1028 GPS_FIX_TYPE_3D_FIX = 3,
1029 #[doc = "DGPS/SBAS aided 3D position"]
1030 GPS_FIX_TYPE_DGPS = 4,
1031 #[doc = "RTK float, 3D position"]
1032 GPS_FIX_TYPE_RTK_FLOAT = 5,
1033 #[doc = "RTK Fixed, 3D position"]
1034 GPS_FIX_TYPE_RTK_FIXED = 6,
1035 #[doc = "Static fixed, typically used for base stations"]
1036 GPS_FIX_TYPE_STATIC = 7,
1037 #[doc = "PPP, 3D position."]
1038 GPS_FIX_TYPE_PPP = 8,
1039}
1040impl GpsFixType {
1041 pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1042}
1043impl Default for GpsFixType {
1044 fn default() -> Self {
1045 Self::DEFAULT
1046 }
1047}
1048bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1049impl GpsInputIgnoreFlags {
1050 pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1051}
1052impl Default for GpsInputIgnoreFlags {
1053 fn default() -> Self {
1054 Self::DEFAULT
1055 }
1056}
1057#[cfg_attr(feature = "ts", derive(TS))]
1058#[cfg_attr(feature = "ts", ts(export))]
1059#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1061#[cfg_attr(feature = "serde", serde(tag = "type"))]
1062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1063#[repr(u32)]
1064#[doc = "Gripper actions."]
1065pub enum GripperActions {
1066 #[doc = "Gripper release cargo."]
1067 GRIPPER_ACTION_RELEASE = 0,
1068 #[doc = "Gripper grab onto cargo."]
1069 GRIPPER_ACTION_GRAB = 1,
1070 #[doc = "Gripper hold current grip state/position."]
1071 GRIPPER_ACTION_HOLD = 2,
1072}
1073impl GripperActions {
1074 pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1075}
1076impl Default for GripperActions {
1077 fn default() -> Self {
1078 Self::DEFAULT
1079 }
1080}
1081bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1082impl HighresImuUpdatedFlags {
1083 pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1084}
1085impl Default for HighresImuUpdatedFlags {
1086 fn default() -> Self {
1087 Self::DEFAULT
1088 }
1089}
1090bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1091impl HilActuatorControlsFlags {
1092 pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1093}
1094impl Default for HilActuatorControlsFlags {
1095 fn default() -> Self {
1096 Self::DEFAULT
1097 }
1098}
1099bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1100impl HilSensorUpdatedFlags {
1101 pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1102}
1103impl Default for HilSensorUpdatedFlags {
1104 fn default() -> Self {
1105 Self::DEFAULT
1106 }
1107}
1108bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1109impl HlFailureFlag {
1110 pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1111}
1112impl Default for HlFailureFlag {
1113 fn default() -> Self {
1114 Self::DEFAULT
1115 }
1116}
1117bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1118impl IlluminatorErrorFlags {
1119 pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1120}
1121impl Default for IlluminatorErrorFlags {
1122 fn default() -> Self {
1123 Self::DEFAULT
1124 }
1125}
1126#[cfg_attr(feature = "ts", derive(TS))]
1127#[cfg_attr(feature = "ts", ts(export))]
1128#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1130#[cfg_attr(feature = "serde", serde(tag = "type"))]
1131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1132#[repr(u32)]
1133#[doc = "Modes of illuminator"]
1134pub enum IlluminatorMode {
1135 #[doc = "Illuminator mode is not specified/unknown"]
1136 ILLUMINATOR_MODE_UNKNOWN = 0,
1137 #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1138 ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1139 #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1140 ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1141}
1142impl IlluminatorMode {
1143 pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1144}
1145impl Default for IlluminatorMode {
1146 fn default() -> Self {
1147 Self::DEFAULT
1148 }
1149}
1150#[cfg_attr(feature = "ts", derive(TS))]
1151#[cfg_attr(feature = "ts", ts(export))]
1152#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1154#[cfg_attr(feature = "serde", serde(tag = "type"))]
1155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1156#[repr(u32)]
1157#[doc = "Type of landing target"]
1158pub enum LandingTargetType {
1159 #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1160 LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1161 #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1162 LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1163 #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1164 LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1165 #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1166 LANDING_TARGET_TYPE_VISION_OTHER = 3,
1167}
1168impl LandingTargetType {
1169 pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1170}
1171impl Default for LandingTargetType {
1172 fn default() -> Self {
1173 Self::DEFAULT
1174 }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MagCalStatus {
1184 MAG_CAL_NOT_STARTED = 0,
1185 MAG_CAL_WAITING_TO_START = 1,
1186 MAG_CAL_RUNNING_STEP_ONE = 2,
1187 MAG_CAL_RUNNING_STEP_TWO = 3,
1188 MAG_CAL_SUCCESS = 4,
1189 MAG_CAL_FAILED = 5,
1190 MAG_CAL_BAD_ORIENTATION = 6,
1191 MAG_CAL_BAD_RADIUS = 7,
1192}
1193impl MagCalStatus {
1194 pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1195}
1196impl Default for MagCalStatus {
1197 fn default() -> Self {
1198 Self::DEFAULT
1199 }
1200}
1201#[cfg_attr(feature = "ts", derive(TS))]
1202#[cfg_attr(feature = "ts", ts(export))]
1203#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1205#[cfg_attr(feature = "serde", serde(tag = "type"))]
1206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1207#[repr(u32)]
1208pub enum MavArmAuthDeniedReason {
1209 #[doc = "Not a specific reason"]
1210 MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1211 #[doc = "Authorizer will send the error as string to GCS"]
1212 MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1213 #[doc = "At least one waypoint have a invalid value"]
1214 MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1215 #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1216 MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1217 #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1218 MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1219 #[doc = "Weather is not good to fly"]
1220 MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1221}
1222impl MavArmAuthDeniedReason {
1223 pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1224}
1225impl Default for MavArmAuthDeniedReason {
1226 fn default() -> Self {
1227 Self::DEFAULT
1228 }
1229}
1230#[cfg_attr(feature = "ts", derive(TS))]
1231#[cfg_attr(feature = "ts", ts(export))]
1232#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1234#[cfg_attr(feature = "serde", serde(tag = "type"))]
1235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1236#[repr(u32)]
1237#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1238pub enum MavAutopilot {
1239 #[doc = "Generic autopilot, full support for everything"]
1240 MAV_AUTOPILOT_GENERIC = 0,
1241 #[doc = "Reserved for future use."]
1242 MAV_AUTOPILOT_RESERVED = 1,
1243 #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1244 MAV_AUTOPILOT_SLUGS = 2,
1245 #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1246 MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1247 #[doc = "OpenPilot, <http://openpilot.org>"]
1248 MAV_AUTOPILOT_OPENPILOT = 4,
1249 #[doc = "Generic autopilot only supporting simple waypoints"]
1250 MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1251 #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1252 MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1253 #[doc = "Generic autopilot supporting the full mission command set"]
1254 MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1255 #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1256 MAV_AUTOPILOT_INVALID = 8,
1257 #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1258 MAV_AUTOPILOT_PPZ = 9,
1259 #[doc = "UAV Dev Board"]
1260 MAV_AUTOPILOT_UDB = 10,
1261 #[doc = "FlexiPilot"]
1262 MAV_AUTOPILOT_FP = 11,
1263 #[doc = "PX4 Autopilot - <http://px4.io/>"]
1264 MAV_AUTOPILOT_PX4 = 12,
1265 #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1266 MAV_AUTOPILOT_SMACCMPILOT = 13,
1267 #[doc = "AutoQuad -- <http://autoquad.org>"]
1268 MAV_AUTOPILOT_AUTOQUAD = 14,
1269 #[doc = "Armazila -- <http://armazila.com>"]
1270 MAV_AUTOPILOT_ARMAZILA = 15,
1271 #[doc = "Aerob -- <http://aerob.ru>"]
1272 MAV_AUTOPILOT_AEROB = 16,
1273 #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1274 MAV_AUTOPILOT_ASLUAV = 17,
1275 #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1276 MAV_AUTOPILOT_SMARTAP = 18,
1277 #[doc = "AirRails - <http://uaventure.com>"]
1278 MAV_AUTOPILOT_AIRRAILS = 19,
1279 #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1280 MAV_AUTOPILOT_REFLEX = 20,
1281}
1282impl MavAutopilot {
1283 pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1284}
1285impl Default for MavAutopilot {
1286 fn default() -> Self {
1287 Self::DEFAULT
1288 }
1289}
1290#[cfg_attr(feature = "ts", derive(TS))]
1291#[cfg_attr(feature = "ts", ts(export))]
1292#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1294#[cfg_attr(feature = "serde", serde(tag = "type"))]
1295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1296#[repr(u32)]
1297#[doc = "Enumeration for battery charge states."]
1298pub enum MavBatteryChargeState {
1299 #[doc = "Low battery state is not provided"]
1300 MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1301 #[doc = "Battery is not in low state. Normal operation."]
1302 MAV_BATTERY_CHARGE_STATE_OK = 1,
1303 #[doc = "Battery state is low, warn and monitor close."]
1304 MAV_BATTERY_CHARGE_STATE_LOW = 2,
1305 #[doc = "Battery state is critical, return or abort immediately."]
1306 MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1307 #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1308 MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1309 #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1310 MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1311 #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1312 MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1313 #[doc = "Battery is charging."]
1314 MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1315}
1316impl MavBatteryChargeState {
1317 pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1318}
1319impl Default for MavBatteryChargeState {
1320 fn default() -> Self {
1321 Self::DEFAULT
1322 }
1323}
1324bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1325impl MavBatteryFault {
1326 pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1327}
1328impl Default for MavBatteryFault {
1329 fn default() -> Self {
1330 Self::DEFAULT
1331 }
1332}
1333#[cfg_attr(feature = "ts", derive(TS))]
1334#[cfg_attr(feature = "ts", ts(export))]
1335#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1337#[cfg_attr(feature = "serde", serde(tag = "type"))]
1338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1339#[repr(u32)]
1340#[doc = "Enumeration of battery functions"]
1341pub enum MavBatteryFunction {
1342 #[doc = "Battery function is unknown"]
1343 MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1344 #[doc = "Battery supports all flight systems"]
1345 MAV_BATTERY_FUNCTION_ALL = 1,
1346 #[doc = "Battery for the propulsion system"]
1347 MAV_BATTERY_FUNCTION_PROPULSION = 2,
1348 #[doc = "Avionics battery"]
1349 MAV_BATTERY_FUNCTION_AVIONICS = 3,
1350 #[doc = "Payload battery"]
1351 MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1352}
1353impl MavBatteryFunction {
1354 pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1355}
1356impl Default for MavBatteryFunction {
1357 fn default() -> Self {
1358 Self::DEFAULT
1359 }
1360}
1361#[cfg_attr(feature = "ts", derive(TS))]
1362#[cfg_attr(feature = "ts", ts(export))]
1363#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1365#[cfg_attr(feature = "serde", serde(tag = "type"))]
1366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1367#[repr(u32)]
1368#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1369pub enum MavBatteryMode {
1370 #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1371 MAV_BATTERY_MODE_UNKNOWN = 0,
1372 #[doc = "Battery is auto discharging (towards storage level)."]
1373 MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1374 #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1375 MAV_BATTERY_MODE_HOT_SWAP = 2,
1376}
1377impl MavBatteryMode {
1378 pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1379}
1380impl Default for MavBatteryMode {
1381 fn default() -> Self {
1382 Self::DEFAULT
1383 }
1384}
1385#[cfg_attr(feature = "ts", derive(TS))]
1386#[cfg_attr(feature = "ts", ts(export))]
1387#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1389#[cfg_attr(feature = "serde", serde(tag = "type"))]
1390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1391#[repr(u32)]
1392#[doc = "Enumeration of battery types"]
1393pub enum MavBatteryType {
1394 #[doc = "Not specified."]
1395 MAV_BATTERY_TYPE_UNKNOWN = 0,
1396 #[doc = "Lithium polymer battery"]
1397 MAV_BATTERY_TYPE_LIPO = 1,
1398 #[doc = "Lithium-iron-phosphate battery"]
1399 MAV_BATTERY_TYPE_LIFE = 2,
1400 #[doc = "Lithium-ION battery"]
1401 MAV_BATTERY_TYPE_LION = 3,
1402 #[doc = "Nickel metal hydride battery"]
1403 MAV_BATTERY_TYPE_NIMH = 4,
1404}
1405impl MavBatteryType {
1406 pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1407}
1408impl Default for MavBatteryType {
1409 fn default() -> Self {
1410 Self::DEFAULT
1411 }
1412}
1413bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Enum used to indicate true or false (also: success or failure, enabled or disabled, active or inactive)."] pub struct MavBool : u8 { # [doc = "False."] const MAV_BOOL_FALSE = 0 ; # [doc = "True."] const MAV_BOOL_TRUE = 1 ; } }
1414impl MavBool {
1415 pub const DEFAULT: Self = Self::MAV_BOOL_FALSE;
1416 pub fn as_bool(&self) -> bool {
1417 self.contains(Self::MAV_BOOL_TRUE)
1418 }
1419}
1420impl Default for MavBool {
1421 fn default() -> Self {
1422 Self::DEFAULT
1423 }
1424}
1425#[cfg_attr(feature = "ts", derive(TS))]
1426#[cfg_attr(feature = "ts", ts(export))]
1427#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1429#[cfg_attr(feature = "serde", serde(tag = "type"))]
1430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1431#[repr(u32)]
1432#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1433pub enum MavCmd {
1434 #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1435 #[doc = ""]
1436 #[doc = "# Parameters"]
1437 #[doc = ""]
1438 #[doc = "| Parameter | Description | Values | Units |"]
1439 #[doc = "| --------- | ----------- | ------ | ----- |"]
1440 #[doc = "| 1 (Hold) | Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| ≥ 0 | s |"]
1441 #[doc = "| 2 (Accept Radius)| Acceptance radius (if the sphere with this radius is hit, the waypoint counts as reached)| ≥ 0 | m |"]
1442 #[doc = "| 3 (Pass Radius)| 0 to pass through the WP, if>0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| | m |"]
1443 #[doc = "| 4 (Yaw) | Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| | deg |"]
1444 #[doc = "| 5 (Latitude)| Latitude | | |"]
1445 #[doc = "| 6 (Longitude)| Longitude | | |"]
1446 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1447 MAV_CMD_NAV_WAYPOINT = 16,
1448 #[doc = "Loiter around this waypoint an unlimited amount of time"]
1449 #[doc = ""]
1450 #[doc = "# Parameters"]
1451 #[doc = ""]
1452 #[doc = "| Parameter | Description | Units |"]
1453 #[doc = "| --------- | ----------- | ----- |"]
1454 #[doc = "| 1 | Empty | |"]
1455 #[doc = "| 2 | Empty | |"]
1456 #[doc = "| 3 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| m |"]
1457 #[doc = "| 4 (Yaw) | Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| deg |"]
1458 #[doc = "| 5 (Latitude)| Latitude | |"]
1459 #[doc = "| 6 (Longitude)| Longitude | |"]
1460 #[doc = "| 7 (Altitude)| Altitude | m |"]
1461 MAV_CMD_NAV_LOITER_UNLIM = 17,
1462 #[doc = "Loiter around this waypoint for X turns"]
1463 #[doc = ""]
1464 #[doc = "# Parameters"]
1465 #[doc = ""]
1466 #[doc = "| Parameter | Description | Values | Units |"]
1467 #[doc = "| --------- | ----------- | ------ | ----- |"]
1468 #[doc = "| 1 (Turns) | Number of turns.| ≥ 0 | |"]
1469 #[doc = "| 2 (Heading Required)| Leave loiter circle only when track heads towards the next waypoint (MAV_BOOL_FALSE: Leave when turns complete). Values not equal to 0 or 1 are invalid.| [`MavBool`] | |"]
1470 #[doc = "| 3 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| | m |"]
1471 #[doc = "| 4 (Xtrack Location)| Loiter circle exit location and/or path to next waypoint (\"xtrack\") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| | |"]
1472 #[doc = "| 5 (Latitude)| Latitude | | |"]
1473 #[doc = "| 6 (Longitude)| Longitude | | |"]
1474 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1475 MAV_CMD_NAV_LOITER_TURNS = 18,
1476 #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1477 #[doc = ""]
1478 #[doc = "# Parameters"]
1479 #[doc = ""]
1480 #[doc = "| Parameter | Description | Values | Units |"]
1481 #[doc = "| --------- | ----------- | ------ | ----- |"]
1482 #[doc = "| 1 (Time) | Loiter time (only starts once Lat, Lon and Alt is reached).| ≥ 0 | s |"]
1483 #[doc = "| 2 (Heading Required)| Leave loiter circle only when track heading towards the next waypoint (MAV_BOOL_FALSE: Leave on time expiry). Values not equal to 0 or 1 are invalid.| [`MavBool`] | |"]
1484 #[doc = "| 3 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| | m |"]
1485 #[doc = "| 4 (Xtrack Location)| Loiter circle exit location and/or path to next waypoint (\"xtrack\") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| | |"]
1486 #[doc = "| 5 (Latitude)| Latitude | | |"]
1487 #[doc = "| 6 (Longitude)| Longitude | | |"]
1488 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1489 MAV_CMD_NAV_LOITER_TIME = 19,
1490 #[doc = "Return to launch location"]
1491 #[doc = ""]
1492 #[doc = "# Parameters"]
1493 #[doc = ""]
1494 #[doc = "| Parameter | Description |"]
1495 #[doc = "| --------- | ----------- |"]
1496 #[doc = "| 1 | Empty |"]
1497 #[doc = "| 2 | Empty |"]
1498 #[doc = "| 3 | Empty |"]
1499 #[doc = "| 4 | Empty |"]
1500 #[doc = "| 5 | Empty |"]
1501 #[doc = "| 6 | Empty |"]
1502 #[doc = "| 7 | Empty |"]
1503 MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1504 #[doc = "Land at location."]
1505 #[doc = ""]
1506 #[doc = "# Parameters"]
1507 #[doc = ""]
1508 #[doc = "| Parameter | Description | Values | Units |"]
1509 #[doc = "| --------- | ----------- | ------ | ----- |"]
1510 #[doc = "| 1 (Abort Alt)| Minimum target altitude if landing is aborted (0 = undefined/use system default).| | m |"]
1511 #[doc = "| 2 (Land Mode)| Precision land mode.| [`PrecisionLandMode`] | |"]
1512 #[doc = "| 3 | Empty. | | |"]
1513 #[doc = "| 4 (Yaw Angle)| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| | deg |"]
1514 #[doc = "| 5 (Latitude)| Latitude. | | |"]
1515 #[doc = "| 6 (Longitude)| Longitude. | | |"]
1516 #[doc = "| 7 (Altitude)| Landing altitude (ground level in current frame).| | m |"]
1517 MAV_CMD_NAV_LAND = 21,
1518 #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1519 #[doc = ""]
1520 #[doc = "# Parameters"]
1521 #[doc = ""]
1522 #[doc = "| Parameter | Description | Units |"]
1523 #[doc = "| --------- | ----------- | ----- |"]
1524 #[doc = "| 1 (Pitch) | Minimum pitch (if airspeed sensor present), desired pitch without sensor| deg |"]
1525 #[doc = "| 2 | Empty | |"]
1526 #[doc = "| 3 | Empty | |"]
1527 #[doc = "| 4 (Yaw) | Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| deg |"]
1528 #[doc = "| 5 (Latitude)| Latitude | |"]
1529 #[doc = "| 6 (Longitude)| Longitude | |"]
1530 #[doc = "| 7 (Altitude)| Altitude | m |"]
1531 MAV_CMD_NAV_TAKEOFF = 22,
1532 #[doc = "Land at local position (local frame only)"]
1533 #[doc = ""]
1534 #[doc = "# Parameters"]
1535 #[doc = ""]
1536 #[doc = "| Parameter | Description | Values | Units |"]
1537 #[doc = "| --------- | ----------- | ------ | ----- |"]
1538 #[doc = "| 1 (Target)| Landing target number (if available)| 0, 1, .. | |"]
1539 #[doc = "| 2 (Offset)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| ≥ 0 | m |"]
1540 #[doc = "| 3 (Descend Rate)| Landing descend rate| | m/s |"]
1541 #[doc = "| 4 (Yaw) | Desired yaw angle| | rad |"]
1542 #[doc = "| 5 (Y Position)| Y-axis position| | m |"]
1543 #[doc = "| 6 (X Position)| X-axis position| | m |"]
1544 #[doc = "| 7 (Z Position)| Z-axis / ground level position| | m |"]
1545 MAV_CMD_NAV_LAND_LOCAL = 23,
1546 #[doc = "Takeoff from local position (local frame only)"]
1547 #[doc = ""]
1548 #[doc = "# Parameters"]
1549 #[doc = ""]
1550 #[doc = "| Parameter | Description | Units |"]
1551 #[doc = "| --------- | ----------- | ----- |"]
1552 #[doc = "| 1 (Pitch) | Minimum pitch (if airspeed sensor present), desired pitch without sensor| rad |"]
1553 #[doc = "| 2 | Empty | |"]
1554 #[doc = "| 3 (Ascend Rate)| Takeoff ascend rate| m/s |"]
1555 #[doc = "| 4 (Yaw) | Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| rad |"]
1556 #[doc = "| 5 (Y Position)| Y-axis position| m |"]
1557 #[doc = "| 6 (X Position)| X-axis position| m |"]
1558 #[doc = "| 7 (Z Position)| Z-axis position| m |"]
1559 MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1560 #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1561 #[doc = ""]
1562 #[doc = "# Parameters"]
1563 #[doc = ""]
1564 #[doc = "| Parameter | Description | Values | Units |"]
1565 #[doc = "| --------- | ----------- | ------ | ----- |"]
1566 #[doc = "| 1 (Following)| Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Multiples of 1 | |"]
1567 #[doc = "| 2 (Ground Speed)| Ground speed of vehicle to be followed| | m/s |"]
1568 #[doc = "| 3 (Radius)| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| | m |"]
1569 #[doc = "| 4 (Yaw) | Desired yaw angle.| | deg |"]
1570 #[doc = "| 5 (Latitude)| Latitude | | |"]
1571 #[doc = "| 6 (Longitude)| Longitude | | |"]
1572 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1573 MAV_CMD_NAV_FOLLOW = 25,
1574 #[doc = "Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1575 #[doc = ""]
1576 #[doc = "# Parameters"]
1577 #[doc = ""]
1578 #[doc = "| Parameter | Description | Values | Units |"]
1579 #[doc = "| --------- | ----------- | ------ | ----- |"]
1580 #[doc = "| 1 (Action)| Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| 0, 1, 2 | |"]
1581 #[doc = "| 2 | Empty | | |"]
1582 #[doc = "| 3 | Empty | | |"]
1583 #[doc = "| 4 | Empty | | |"]
1584 #[doc = "| 5 | Empty | | |"]
1585 #[doc = "| 6 | Empty | | |"]
1586 #[doc = "| 7 (Altitude)| Desired altitude| | m |"]
1587 MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1588 #[doc = "Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1589 #[doc = ""]
1590 #[doc = "# Parameters"]
1591 #[doc = ""]
1592 #[doc = "| Parameter | Description | Values | Units |"]
1593 #[doc = "| --------- | ----------- | ------ | ----- |"]
1594 #[doc = "| 1 (Heading Required)| Leave loiter circle only when track heading towards the next waypoint (MAV_BOOL_FALSE: Leave when altitude reached). Values not equal to 0 or 1 are invalid.| [`MavBool`] | |"]
1595 #[doc = "| 2 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| | m |"]
1596 #[doc = "| 3 | Empty | | |"]
1597 #[doc = "| 4 (Xtrack Location)| Loiter circle exit location and/or path to next waypoint (\"xtrack\") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| 0, 1 | |"]
1598 #[doc = "| 5 (Latitude)| Latitude | | |"]
1599 #[doc = "| 6 (Longitude)| Longitude | | |"]
1600 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1601 MAV_CMD_NAV_LOITER_TO_ALT = 31,
1602 #[doc = "Begin following a target"]
1603 #[doc = ""]
1604 #[doc = "# Parameters"]
1605 #[doc = ""]
1606 #[doc = "| Parameter | Description | Values | Units |"]
1607 #[doc = "| --------- | ----------- | ------ | ----- |"]
1608 #[doc = "| 1 (System ID)| System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| 0, 1, .. , 255 | |"]
1609 #[doc = "| 2 | Reserved | | |"]
1610 #[doc = "| 3 | Reserved | | |"]
1611 #[doc = "| 4 (Altitude Mode)| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| 0, 1, 2 | |"]
1612 #[doc = "| 5 (Altitude)| Altitude above home. (used if mode=2)| | m |"]
1613 #[doc = "| 6 | Reserved | | |"]
1614 #[doc = "| 7 (Time to Land)| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| ≥ 0 | s |"]
1615 MAV_CMD_DO_FOLLOW = 32,
1616 #[doc = "Reposition the MAV after a follow target command has been sent"]
1617 #[doc = ""]
1618 #[doc = "# Parameters"]
1619 #[doc = ""]
1620 #[doc = "| Parameter | Description | Units |"]
1621 #[doc = "| --------- | ----------- | ----- |"]
1622 #[doc = "| 1 (Camera Q1)| Camera q1 (where 0 is on the ray from the camera to the tracking device)| |"]
1623 #[doc = "| 2 (Camera Q2)| Camera q2 | |"]
1624 #[doc = "| 3 (Camera Q3)| Camera q3 | |"]
1625 #[doc = "| 4 (Camera Q4)| Camera q4 | |"]
1626 #[doc = "| 5 (Altitude Offset)| altitude offset from target| m |"]
1627 #[doc = "| 6 (X Offset)| X offset from target| m |"]
1628 #[doc = "| 7 (Y Offset)| Y offset from target| m |"]
1629 MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1630 #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1631 #[doc = ""]
1632 #[doc = "# Parameters"]
1633 #[doc = ""]
1634 #[doc = "| Parameter | Description | Values | Units |"]
1635 #[doc = "| --------- | ----------- | ------ | ----- |"]
1636 #[doc = "| 1 (Radius)| Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.| | m |"]
1637 #[doc = "| 2 (Velocity)| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.| | m/s |"]
1638 #[doc = "| 3 (Yaw Behavior)| Yaw behavior of the vehicle.| [`OrbitYawBehaviour`] | |"]
1639 #[doc = "| 4 (Orbits)| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| ≥ 0 | rad |"]
1640 #[doc = "| 5 (Latitude/X)| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| | |"]
1641 #[doc = "| 6 (Longitude/Y)| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| | |"]
1642 #[doc = "| 7 (Altitude/Z)| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.| | |"]
1643 MAV_CMD_DO_ORBIT = 34,
1644 #[doc = "Fly a figure eight path as defined by the parameters. Set parameters to NaN/INT32_MAX (as appropriate) to use system-default values. The command is intended for fixed wing vehicles (and VTOL hybrids flying in fixed-wing mode), allowing POI tracking for gimbals that don't support infinite rotation. This command only defines the flight path. Speed should be set independently (use e.g. MAV_CMD_DO_CHANGE_SPEED). Yaw and other degrees of freedom are not specified, and will be flight-stack specific (on vehicles where they can be controlled independent of the heading)."]
1645 #[doc = ""]
1646 #[doc = "# Parameters"]
1647 #[doc = ""]
1648 #[doc = "| Parameter | Description | Values | Units |"]
1649 #[doc = "| --------- | ----------- | ------ | ----- |"]
1650 #[doc = "| 1 (Major Radius)| Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise. NaN: The radius will be set to 2.5 times the minor radius and direction is clockwise. Must be greater or equal to two times the minor radius for feasible values.| | m |"]
1651 #[doc = "| 2 (Minor Radius)| Minor axis radius of the figure eight. Defines the radius of the two circles that make up the figure. Negative value has no effect. NaN: The radius will be set to the default loiter radius.| | m |"]
1652 #[doc = "| 3 | | Reserved (use NaN) | |"]
1653 #[doc = "| 4 (Orientation)| Orientation of the figure eight major axis with respect to true north (range: [-pi,pi]). NaN: use default orientation aligned to true north.| | rad |"]
1654 #[doc = "| 5 (Latitude/X)| Center point latitude/X coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed. INT32_MAX or NaN: Use current vehicle position, or current center if already loitering.| | |"]
1655 #[doc = "| 6 (Longitude/Y)| Center point longitude/Y coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed. INT32_MAX or NaN: Use current vehicle position, or current center if already loitering.| | |"]
1656 #[doc = "| 7 (Altitude/Z)| Center point altitude MSL/Z coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed. INT32_MAX or NaN: Use current vehicle altitude.| | |"]
1657 MAV_CMD_DO_FIGURE_EIGHT = 35,
1658 #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Superseded since 2018-01)"]
1659 #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1660 #[doc = ""]
1661 #[doc = "# Parameters"]
1662 #[doc = ""]
1663 #[doc = "| Parameter | Description | Values |"]
1664 #[doc = "| --------- | ----------- | ------ |"]
1665 #[doc = "| 1 (ROI Mode)| Region of interest mode.| [`MavRoi`] |"]
1666 #[doc = "| 2 (WP Index)| Waypoint index/ target ID. (see MAV_ROI enum)| 0, 1, .. |"]
1667 #[doc = "| 3 (ROI Index)| ROI index (allows a vehicle to manage multiple ROI's)| 0, 1, .. |"]
1668 #[doc = "| 4 | Empty | |"]
1669 #[doc = "| 5 (X) | x the location of the fixed ROI (see MAV_FRAME)| |"]
1670 #[doc = "| 6 (Y) | y | |"]
1671 #[doc = "| 7 (Z) | z | |"]
1672 MAV_CMD_NAV_ROI = 80,
1673 #[doc = "Control autonomous path planning on the MAV."]
1674 #[doc = ""]
1675 #[doc = "# Parameters"]
1676 #[doc = ""]
1677 #[doc = "| Parameter | Description | Values | Units |"]
1678 #[doc = "| --------- | ----------- | ------ | ----- |"]
1679 #[doc = "| 1 (Local Ctrl)| 0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0, 1, 2 | |"]
1680 #[doc = "| 2 (Global Ctrl)| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| 0, 1, .. , 3 | |"]
1681 #[doc = "| 3 | Empty | | |"]
1682 #[doc = "| 4 (Yaw) | Yaw angle at goal| | deg |"]
1683 #[doc = "| 5 (Latitude/X)| Latitude/X of goal| | |"]
1684 #[doc = "| 6 (Longitude/Y)| Longitude/Y of goal| | |"]
1685 #[doc = "| 7 (Altitude/Z)| Altitude/Z of goal| | |"]
1686 MAV_CMD_NAV_PATHPLANNING = 81,
1687 #[doc = "Navigate to waypoint using a spline path."]
1688 #[doc = ""]
1689 #[doc = "# Parameters"]
1690 #[doc = ""]
1691 #[doc = "| Parameter | Description | Values | Units |"]
1692 #[doc = "| --------- | ----------- | ------ | ----- |"]
1693 #[doc = "| 1 (Hold) | Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| ≥ 0 | s |"]
1694 #[doc = "| 2 | Empty | | |"]
1695 #[doc = "| 3 | Empty | | |"]
1696 #[doc = "| 4 | Empty | | |"]
1697 #[doc = "| 5 (Latitude/X)| Latitude/X of goal| | |"]
1698 #[doc = "| 6 (Longitude/Y)| Longitude/Y of goal| | |"]
1699 #[doc = "| 7 (Altitude/Z)| Altitude/Z of goal| | |"]
1700 MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1701 #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1702 #[doc = ""]
1703 #[doc = "# Parameters"]
1704 #[doc = ""]
1705 #[doc = "| Parameter | Description | Values | Units |"]
1706 #[doc = "| --------- | ----------- | ------ | ----- |"]
1707 #[doc = "| 1 | Empty | | |"]
1708 #[doc = "| 2 (Transition Heading)| Front transition heading.| [`VtolTransitionHeading`] | |"]
1709 #[doc = "| 3 | Empty | | |"]
1710 #[doc = "| 4 (Yaw Angle)| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| | deg |"]
1711 #[doc = "| 5 (Latitude)| Latitude | | |"]
1712 #[doc = "| 6 (Longitude)| Longitude | | |"]
1713 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1714 MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1715 #[doc = "Land using VTOL mode"]
1716 #[doc = ""]
1717 #[doc = "# Parameters"]
1718 #[doc = ""]
1719 #[doc = "| Parameter | Description | Values | Units |"]
1720 #[doc = "| --------- | ----------- | ------ | ----- |"]
1721 #[doc = "| 1 (Land Options)| Landing behaviour.| [`NavVtolLandOptions`] | |"]
1722 #[doc = "| 2 | Empty | | |"]
1723 #[doc = "| 3 (Approach Altitude)| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| | m |"]
1724 #[doc = "| 4 (Yaw) | Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| | deg |"]
1725 #[doc = "| 5 (Latitude)| Latitude | | |"]
1726 #[doc = "| 6 (Longitude)| Longitude | | |"]
1727 #[doc = "| 7 (Ground Altitude)| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).| | m |"]
1728 MAV_CMD_NAV_VTOL_LAND = 85,
1729 #[doc = "Hand control over to an external controller"]
1730 #[doc = ""]
1731 #[doc = "# Parameters"]
1732 #[doc = ""]
1733 #[doc = "| Parameter | Description | Values |"]
1734 #[doc = "| --------- | ----------- | ------ |"]
1735 #[doc = "| 1 (Enable)| Guided mode on (MAV_BOOL_FALSE: Off). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
1736 #[doc = "| 2 | Empty | |"]
1737 #[doc = "| 3 | Empty | |"]
1738 #[doc = "| 4 | Empty | |"]
1739 #[doc = "| 5 | Empty | |"]
1740 #[doc = "| 6 | Empty | |"]
1741 #[doc = "| 7 | Empty | |"]
1742 MAV_CMD_NAV_GUIDED_ENABLE = 92,
1743 #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1744 #[doc = ""]
1745 #[doc = "# Parameters"]
1746 #[doc = ""]
1747 #[doc = "| Parameter | Description | Values | Units |"]
1748 #[doc = "| --------- | ----------- | ------ | ----- |"]
1749 #[doc = "| 1 (Delay) | Delay (-1 to enable time-of-day fields)| -1, 0, .. | s |"]
1750 #[doc = "| 2 (Hour) | hour (24h format, UTC, -1 to ignore)| -1, 0, .. , 23 | |"]
1751 #[doc = "| 3 (Minute)| minute (24h format, UTC, -1 to ignore)| -1, 0, .. , 59 | |"]
1752 #[doc = "| 4 (Second)| second (24h format, UTC, -1 to ignore)| -1, 0, .. , 59 | |"]
1753 #[doc = "| 5 | Empty | | |"]
1754 #[doc = "| 6 | Empty | | |"]
1755 #[doc = "| 7 | Empty | | |"]
1756 MAV_CMD_NAV_DELAY = 93,
1757 #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1758 #[doc = ""]
1759 #[doc = "# Parameters"]
1760 #[doc = ""]
1761 #[doc = "| Parameter | Description | Values | Units |"]
1762 #[doc = "| --------- | ----------- | ------ | ----- |"]
1763 #[doc = "| 1 (Max Descent)| Maximum distance to descend.| ≥ 0 | m |"]
1764 #[doc = "| 2 | Empty | | |"]
1765 #[doc = "| 3 | Empty | | |"]
1766 #[doc = "| 4 | Empty | | |"]
1767 #[doc = "| 5 (Latitude)| Latitude | | |"]
1768 #[doc = "| 6 (Longitude)| Longitude | | |"]
1769 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1770 MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1771 #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1772 #[doc = ""]
1773 #[doc = "# Parameters"]
1774 #[doc = ""]
1775 #[doc = "| Parameter | Description |"]
1776 #[doc = "| --------- | ----------- |"]
1777 #[doc = "| 1 | Empty |"]
1778 #[doc = "| 2 | Empty |"]
1779 #[doc = "| 3 | Empty |"]
1780 #[doc = "| 4 | Empty |"]
1781 #[doc = "| 5 | Empty |"]
1782 #[doc = "| 6 | Empty |"]
1783 #[doc = "| 7 | Empty |"]
1784 MAV_CMD_NAV_LAST = 95,
1785 #[doc = "Delay mission state machine."]
1786 #[doc = ""]
1787 #[doc = "# Parameters"]
1788 #[doc = ""]
1789 #[doc = "| Parameter | Description | Values | Units |"]
1790 #[doc = "| --------- | ----------- | ------ | ----- |"]
1791 #[doc = "| 1 (Delay) | Delay | ≥ 0 | s |"]
1792 #[doc = "| 2 | Empty | | |"]
1793 #[doc = "| 3 | Empty | | |"]
1794 #[doc = "| 4 | Empty | | |"]
1795 #[doc = "| 5 | Empty | | |"]
1796 #[doc = "| 6 | Empty | | |"]
1797 #[doc = "| 7 | Empty | | |"]
1798 MAV_CMD_CONDITION_DELAY = 112,
1799 #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1800 #[doc = ""]
1801 #[doc = "# Parameters"]
1802 #[doc = ""]
1803 #[doc = "| Parameter | Description | Units |"]
1804 #[doc = "| --------- | ----------- | ----- |"]
1805 #[doc = "| 1 (Rate) | Descent / Ascend rate.| m/s |"]
1806 #[doc = "| 2 | Empty | |"]
1807 #[doc = "| 3 | Empty | |"]
1808 #[doc = "| 4 | Empty | |"]
1809 #[doc = "| 5 | Empty | |"]
1810 #[doc = "| 6 | Empty | |"]
1811 #[doc = "| 7 (Altitude)| Target Altitude| m |"]
1812 MAV_CMD_CONDITION_CHANGE_ALT = 113,
1813 #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1814 #[doc = ""]
1815 #[doc = "# Parameters"]
1816 #[doc = ""]
1817 #[doc = "| Parameter | Description | Values | Units |"]
1818 #[doc = "| --------- | ----------- | ------ | ----- |"]
1819 #[doc = "| 1 (Distance)| Distance. | ≥ 0 | m |"]
1820 #[doc = "| 2 | Empty | | |"]
1821 #[doc = "| 3 | Empty | | |"]
1822 #[doc = "| 4 | Empty | | |"]
1823 #[doc = "| 5 | Empty | | |"]
1824 #[doc = "| 6 | Empty | | |"]
1825 #[doc = "| 7 | Empty | | |"]
1826 MAV_CMD_CONDITION_DISTANCE = 114,
1827 #[doc = "Reach a certain target angle."]
1828 #[doc = ""]
1829 #[doc = "# Parameters"]
1830 #[doc = ""]
1831 #[doc = "| Parameter | Description | Values | Units |"]
1832 #[doc = "| --------- | ----------- | ------ | ----- |"]
1833 #[doc = "| 1 (Angle) | target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3.| 0 .. 360 | deg |"]
1834 #[doc = "| 2 (Angular Speed)| angular speed| ≥ 0 | deg/s |"]
1835 #[doc = "| 3 (Direction)| direction: -1: counter clockwise, 0: shortest direction, 1: clockwise| -1, 0, 1 | |"]
1836 #[doc = "| 4 (Relative)| Relative offset (MAV_BOOL_FALSE: absolute angle). Values not equal to 0 or 1 are invalid.| [`MavBool`] | |"]
1837 #[doc = "| 5 | Empty | | |"]
1838 #[doc = "| 6 | Empty | | |"]
1839 #[doc = "| 7 | Empty | | |"]
1840 MAV_CMD_CONDITION_YAW = 115,
1841 #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1842 #[doc = ""]
1843 #[doc = "# Parameters"]
1844 #[doc = ""]
1845 #[doc = "| Parameter | Description |"]
1846 #[doc = "| --------- | ----------- |"]
1847 #[doc = "| 1 | Empty |"]
1848 #[doc = "| 2 | Empty |"]
1849 #[doc = "| 3 | Empty |"]
1850 #[doc = "| 4 | Empty |"]
1851 #[doc = "| 5 | Empty |"]
1852 #[doc = "| 6 | Empty |"]
1853 #[doc = "| 7 | Empty |"]
1854 MAV_CMD_CONDITION_LAST = 159,
1855 #[doc = "Set system mode."]
1856 #[doc = ""]
1857 #[doc = "# Parameters"]
1858 #[doc = ""]
1859 #[doc = "| Parameter | Description | Values |"]
1860 #[doc = "| --------- | ----------- | ------ |"]
1861 #[doc = "| 1 (Mode) | Mode flags. MAV_MODE values can be used to set some mode flag combinations.| [`MavModeFlag`] |"]
1862 #[doc = "| 2 (Custom Mode)| Custom system-specific mode (see target autopilot specifications for mode information). If MAV_MODE_FLAG_CUSTOM_MODE_ENABLED is set in param1 (mode) this mode is used: otherwise the field is ignored.| |"]
1863 #[doc = "| 3 (Custom Submode)| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| |"]
1864 #[doc = "| 4 | Empty | |"]
1865 #[doc = "| 5 | Empty | |"]
1866 #[doc = "| 6 | Empty | |"]
1867 #[doc = "| 7 | Empty | |"]
1868 MAV_CMD_DO_SET_MODE = 176,
1869 #[doc = "Jump to the desired command in the mission list. Repeat this action only the specified number of times"]
1870 #[doc = ""]
1871 #[doc = "# Parameters"]
1872 #[doc = ""]
1873 #[doc = "| Parameter | Description | Values |"]
1874 #[doc = "| --------- | ----------- | ------ |"]
1875 #[doc = "| 1 (Number)| Sequence number| 0, 1, .. |"]
1876 #[doc = "| 2 (Repeat)| Repeat count| 0, 1, .. |"]
1877 #[doc = "| 3 | Empty | |"]
1878 #[doc = "| 4 | Empty | |"]
1879 #[doc = "| 5 | Empty | |"]
1880 #[doc = "| 6 | Empty | |"]
1881 #[doc = "| 7 | Empty | |"]
1882 MAV_CMD_DO_JUMP = 177,
1883 #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1884 #[doc = ""]
1885 #[doc = "# Parameters"]
1886 #[doc = ""]
1887 #[doc = "| Parameter | Description | Values | Units |"]
1888 #[doc = "| --------- | ----------- | ------ | ----- |"]
1889 #[doc = "| 1 (Speed Type)| Speed type of value set in param2 (such as airspeed, ground speed, and so on)| [`SpeedType`] | |"]
1890 #[doc = "| 2 (Speed) | Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| ≥ -2 | m/s |"]
1891 #[doc = "| 3 (Throttle)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| ≥ -2 | % |"]
1892 #[doc = "| 4 | | Reserved (use 0) | |"]
1893 #[doc = "| 5 | | Reserved (use 0) | |"]
1894 #[doc = "| 6 | | Reserved (use 0) | |"]
1895 #[doc = "| 7 | | Reserved (use 0) | |"]
1896 MAV_CMD_DO_CHANGE_SPEED = 178,
1897 #[doc = "Sets the home position to either to the current position or a specified position. The home position is the default position that the system will return to and land on. The position is set automatically by the system during the takeoff (and may also be set using this command). Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1898 #[doc = ""]
1899 #[doc = "# Parameters"]
1900 #[doc = ""]
1901 #[doc = "| Parameter | Description | Values | Units |"]
1902 #[doc = "| --------- | ----------- | ------ | ----- |"]
1903 #[doc = "| 1 (Use Current)| Use current location (MAV_BOOL_FALSE: use specified location). Values not equal to 0 or 1 are invalid.| [`MavBool`] | |"]
1904 #[doc = "| 2 (Roll) | Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| -180 .. 180 | deg |"]
1905 #[doc = "| 3 (Pitch) | Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| -90 .. 90 | deg |"]
1906 #[doc = "| 4 (Yaw) | Yaw angle. NaN to use default heading. Range: -180..180 degrees.| -180 .. 180 | deg |"]
1907 #[doc = "| 5 (Latitude)| Latitude | | |"]
1908 #[doc = "| 6 (Longitude)| Longitude | | |"]
1909 #[doc = "| 7 (Altitude)| Altitude | | m |"]
1910 MAV_CMD_DO_SET_HOME = 179,
1911 #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1912 #[doc = "Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1913 #[doc = ""]
1914 #[doc = "# Parameters"]
1915 #[doc = ""]
1916 #[doc = "| Parameter | Description | Values |"]
1917 #[doc = "| --------- | ----------- | ------ |"]
1918 #[doc = "| 1 (Number)| Parameter number| 0, 1, .. |"]
1919 #[doc = "| 2 (Value) | Parameter value| |"]
1920 #[doc = "| 3 | Empty | |"]
1921 #[doc = "| 4 | Empty | |"]
1922 #[doc = "| 5 | Empty | |"]
1923 #[doc = "| 6 | Empty | |"]
1924 #[doc = "| 7 | Empty | |"]
1925 MAV_CMD_DO_SET_PARAMETER = 180,
1926 #[doc = "Set a relay to a condition."]
1927 #[doc = ""]
1928 #[doc = "# Parameters"]
1929 #[doc = ""]
1930 #[doc = "| Parameter | Description | Values |"]
1931 #[doc = "| --------- | ----------- | ------ |"]
1932 #[doc = "| 1 (Instance)| Relay instance number.| 0, 1, .. |"]
1933 #[doc = "| 2 (Setting)| Setting. (1=on, 0=off, others possible depending on system hardware)| 0, 1, .. |"]
1934 #[doc = "| 3 | Empty | |"]
1935 #[doc = "| 4 | Empty | |"]
1936 #[doc = "| 5 | Empty | |"]
1937 #[doc = "| 6 | Empty | |"]
1938 #[doc = "| 7 | Empty | |"]
1939 MAV_CMD_DO_SET_RELAY = 181,
1940 #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1941 #[doc = ""]
1942 #[doc = "# Parameters"]
1943 #[doc = ""]
1944 #[doc = "| Parameter | Description | Values | Units |"]
1945 #[doc = "| --------- | ----------- | ------ | ----- |"]
1946 #[doc = "| 1 (Instance)| Relay instance number.| 0, 1, .. | |"]
1947 #[doc = "| 2 (Count) | Cycle count.| 1, 2, .. | |"]
1948 #[doc = "| 3 (Time) | Cycle time. | ≥ 0 | s |"]
1949 #[doc = "| 4 | Empty | | |"]
1950 #[doc = "| 5 | Empty | | |"]
1951 #[doc = "| 6 | Empty | | |"]
1952 #[doc = "| 7 | Empty | | |"]
1953 MAV_CMD_DO_REPEAT_RELAY = 182,
1954 #[doc = "Set a servo to a desired PWM value."]
1955 #[doc = ""]
1956 #[doc = "# Parameters"]
1957 #[doc = ""]
1958 #[doc = "| Parameter | Description | Values | Units |"]
1959 #[doc = "| --------- | ----------- | ------ | ----- |"]
1960 #[doc = "| 1 (Instance)| Servo instance number.| 0, 1, .. | |"]
1961 #[doc = "| 2 (PWM) | Pulse Width Modulation.| 0, 1, .. | us |"]
1962 #[doc = "| 3 | Empty | | |"]
1963 #[doc = "| 4 | Empty | | |"]
1964 #[doc = "| 5 | Empty | | |"]
1965 #[doc = "| 6 | Empty | | |"]
1966 #[doc = "| 7 | Empty | | |"]
1967 MAV_CMD_DO_SET_SERVO = 183,
1968 #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1969 #[doc = ""]
1970 #[doc = "# Parameters"]
1971 #[doc = ""]
1972 #[doc = "| Parameter | Description | Values | Units |"]
1973 #[doc = "| --------- | ----------- | ------ | ----- |"]
1974 #[doc = "| 1 (Instance)| Servo instance number.| 0, 1, .. | |"]
1975 #[doc = "| 2 (PWM) | Pulse Width Modulation.| 0, 1, .. | us |"]
1976 #[doc = "| 3 (Count) | Cycle count.| 1, 2, .. | |"]
1977 #[doc = "| 4 (Time) | Cycle time. | ≥ 0 | s |"]
1978 #[doc = "| 5 | Empty | | |"]
1979 #[doc = "| 6 | Empty | | |"]
1980 #[doc = "| 7 | Empty | | |"]
1981 MAV_CMD_DO_REPEAT_SERVO = 184,
1982 #[doc = "Terminate flight immediately. Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground. The vehicle will ignore RC or other input until it has been power-cycled. Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing). On multicopters without a parachute it may trigger a crash landing. Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION. Support for this command can also be tested by sending the command with param1=0 (<0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1983 #[doc = ""]
1984 #[doc = "# Parameters"]
1985 #[doc = ""]
1986 #[doc = "| Parameter | Description | Values |"]
1987 #[doc = "| --------- | ----------- | ------ |"]
1988 #[doc = "| 1 (Terminate)| Flight termination activated if>0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| 0, 1 |"]
1989 #[doc = "| 2 | Empty | |"]
1990 #[doc = "| 3 | Empty | |"]
1991 #[doc = "| 4 | Empty | |"]
1992 #[doc = "| 5 | Empty | |"]
1993 #[doc = "| 6 | Empty | |"]
1994 #[doc = "| 7 | Empty | |"]
1995 MAV_CMD_DO_FLIGHTTERMINATION = 185,
1996 #[doc = "Change altitude set point."]
1997 #[doc = ""]
1998 #[doc = "# Parameters"]
1999 #[doc = ""]
2000 #[doc = "| Parameter | Description | Values | Units |"]
2001 #[doc = "| --------- | ----------- | ------ | ----- |"]
2002 #[doc = "| 1 (Altitude)| Altitude. | | m |"]
2003 #[doc = "| 2 (Frame) | Frame of new altitude.| [`MavFrame`] | |"]
2004 #[doc = "| 3 | Empty | | |"]
2005 #[doc = "| 4 | Empty | | |"]
2006 #[doc = "| 5 | Empty | | |"]
2007 #[doc = "| 6 | Empty | | |"]
2008 #[doc = "| 7 | Empty | | |"]
2009 MAV_CMD_DO_CHANGE_ALTITUDE = 186,
2010 #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
2011 #[doc = ""]
2012 #[doc = "# Parameters"]
2013 #[doc = ""]
2014 #[doc = "| Parameter | Description | Values |"]
2015 #[doc = "| --------- | ----------- | ------ |"]
2016 #[doc = "| 1 (Actuator 1)| Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
2017 #[doc = "| 2 (Actuator 2)| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
2018 #[doc = "| 3 (Actuator 3)| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
2019 #[doc = "| 4 (Actuator 4)| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
2020 #[doc = "| 5 (Actuator 5)| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
2021 #[doc = "| 6 (Actuator 6)| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
2022 #[doc = "| 7 (Index) | Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| 0, 1, .. |"]
2023 MAV_CMD_DO_SET_ACTUATOR = 187,
2024 #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item). A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint). The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path. The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path. If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing. If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing. The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed. If specified, the item defines the waypoint at which the return segment starts. If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
2025 #[doc = ""]
2026 #[doc = "# Parameters"]
2027 #[doc = ""]
2028 #[doc = "| Parameter | Description | Units |"]
2029 #[doc = "| --------- | ----------- | ----- |"]
2030 #[doc = "| 1 | Empty | |"]
2031 #[doc = "| 2 | Empty | |"]
2032 #[doc = "| 3 | Empty | |"]
2033 #[doc = "| 4 | Empty | |"]
2034 #[doc = "| 5 (Latitude)| Latitudee. 0: not used.| |"]
2035 #[doc = "| 6 (Longitude)| Longitudee. 0: not used.| |"]
2036 #[doc = "| 7 (Altitude)| Altitudee. 0: not used.| m |"]
2037 MAV_CMD_DO_RETURN_PATH_START = 188,
2038 #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern. When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern. It should be followed by a navigation item that defines the first waypoint of the landing sequence. The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded). If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence. \t When sent as a command it triggers a landing using a mission landing pattern. \t The location parameters are not used in this case, and should be set to 0."]
2039 #[doc = ""]
2040 #[doc = "# Parameters"]
2041 #[doc = ""]
2042 #[doc = "| Parameter | Description | Units |"]
2043 #[doc = "| --------- | ----------- | ----- |"]
2044 #[doc = "| 1 | Empty | |"]
2045 #[doc = "| 2 | Empty | |"]
2046 #[doc = "| 3 | Empty | |"]
2047 #[doc = "| 4 | Empty | |"]
2048 #[doc = "| 5 (Latitude)| Latitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| |"]
2049 #[doc = "| 6 (Longitude)| Longitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| |"]
2050 #[doc = "| 7 (Altitude)| Altitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| m |"]
2051 MAV_CMD_DO_LAND_START = 189,
2052 #[doc = "Mission command to perform a landing from a rally point."]
2053 #[doc = ""]
2054 #[doc = "# Parameters"]
2055 #[doc = ""]
2056 #[doc = "| Parameter | Description | Units |"]
2057 #[doc = "| --------- | ----------- | ----- |"]
2058 #[doc = "| 1 (Altitude)| Break altitude| m |"]
2059 #[doc = "| 2 (Speed) | Landing speed| m/s |"]
2060 #[doc = "| 3 | Empty | |"]
2061 #[doc = "| 4 | Empty | |"]
2062 #[doc = "| 5 | Empty | |"]
2063 #[doc = "| 6 | Empty | |"]
2064 #[doc = "| 7 | Empty | |"]
2065 MAV_CMD_DO_RALLY_LAND = 190,
2066 #[doc = "Mission command to safely abort an autonomous landing."]
2067 #[doc = ""]
2068 #[doc = "# Parameters"]
2069 #[doc = ""]
2070 #[doc = "| Parameter | Description | Units |"]
2071 #[doc = "| --------- | ----------- | ----- |"]
2072 #[doc = "| 1 (Altitude)| Altitude | m |"]
2073 #[doc = "| 2 | Empty | |"]
2074 #[doc = "| 3 | Empty | |"]
2075 #[doc = "| 4 | Empty | |"]
2076 #[doc = "| 5 | Empty | |"]
2077 #[doc = "| 6 | Empty | |"]
2078 #[doc = "| 7 | Empty | |"]
2079 MAV_CMD_DO_GO_AROUND = 191,
2080 #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
2081 #[doc = ""]
2082 #[doc = "# Parameters"]
2083 #[doc = ""]
2084 #[doc = "| Parameter | Description | Values | Units |"]
2085 #[doc = "| --------- | ----------- | ------ | ----- |"]
2086 #[doc = "| 1 (Speed) | Ground speed, less than 0 (-1) for default| ≥ -1 | m/s |"]
2087 #[doc = "| 2 (Bitmask)| Bitmask of option flags.| [`MavDoRepositionFlags`] | |"]
2088 #[doc = "| 3 (Radius)| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored.| | m |"]
2089 #[doc = "| 4 (Yaw) | Yaw heading (heading reference defined in Bitmask field). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| | rad |"]
2090 #[doc = "| 5 (Latitude)| Latitude | | |"]
2091 #[doc = "| 6 (Longitude)| Longitude | | |"]
2092 #[doc = "| 7 (Altitude)| Altitude | | m |"]
2093 MAV_CMD_DO_REPOSITION = 192,
2094 #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
2095 #[doc = ""]
2096 #[doc = "# Parameters"]
2097 #[doc = ""]
2098 #[doc = "| Parameter | Description | Values |"]
2099 #[doc = "| --------- | ----------- | ------ |"]
2100 #[doc = "| 1 (Continue)| Continue mission (MAV_BOOL_TRUE), Pause current mission or reposition command, hold current position (MAV_BOOL_FALSE). Values not equal to 0 or 1 are invalid. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| [`MavBool`] |"]
2101 #[doc = "| 2 | Reserved | |"]
2102 #[doc = "| 3 | Reserved | |"]
2103 #[doc = "| 4 | Reserved | |"]
2104 #[doc = "| 5 | Reserved | |"]
2105 #[doc = "| 6 | Reserved | |"]
2106 #[doc = "| 7 | Reserved | |"]
2107 MAV_CMD_DO_PAUSE_CONTINUE = 193,
2108 #[doc = "Set moving direction to forward or reverse."]
2109 #[doc = ""]
2110 #[doc = "# Parameters"]
2111 #[doc = ""]
2112 #[doc = "| Parameter | Description | Values |"]
2113 #[doc = "| --------- | ----------- | ------ |"]
2114 #[doc = "| 1 (Reverse)| Reverse direction (MAV_BOOL_FALSE: Forward direction). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2115 #[doc = "| 2 | Empty | |"]
2116 #[doc = "| 3 | Empty | |"]
2117 #[doc = "| 4 | Empty | |"]
2118 #[doc = "| 5 | Empty | |"]
2119 #[doc = "| 6 | Empty | |"]
2120 #[doc = "| 7 | Empty | |"]
2121 MAV_CMD_DO_SET_REVERSE = 194,
2122 #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
2123 #[doc = ""]
2124 #[doc = "# Parameters"]
2125 #[doc = ""]
2126 #[doc = "| Parameter | Description | Units |"]
2127 #[doc = "| --------- | ----------- | ----- |"]
2128 #[doc = "| 1 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| |"]
2129 #[doc = "| 2 | Empty | |"]
2130 #[doc = "| 3 | Empty | |"]
2131 #[doc = "| 4 | Empty | |"]
2132 #[doc = "| 5 (Latitude)| Latitude of ROI location| degE7 |"]
2133 #[doc = "| 6 (Longitude)| Longitude of ROI location| degE7 |"]
2134 #[doc = "| 7 (Altitude)| Altitude of ROI location| m |"]
2135 MAV_CMD_DO_SET_ROI_LOCATION = 195,
2136 #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2137 #[doc = ""]
2138 #[doc = "# Parameters"]
2139 #[doc = ""]
2140 #[doc = "| Parameter | Description | Units |"]
2141 #[doc = "| --------- | ----------- | ----- |"]
2142 #[doc = "| 1 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| |"]
2143 #[doc = "| 2 | Empty | |"]
2144 #[doc = "| 3 | Empty | |"]
2145 #[doc = "| 4 | Empty | |"]
2146 #[doc = "| 5 (Pitch Offset)| Pitch offset from next waypoint, positive pitching up| deg |"]
2147 #[doc = "| 6 (Roll Offset)| Roll offset from next waypoint, positive rolling to the right| deg |"]
2148 #[doc = "| 7 (Yaw Offset)| Yaw offset from next waypoint, positive yawing to the right| deg |"]
2149 MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
2150 #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
2151 #[doc = ""]
2152 #[doc = "# Parameters"]
2153 #[doc = ""]
2154 #[doc = "| Parameter | Description |"]
2155 #[doc = "| --------- | ----------- |"]
2156 #[doc = "| 1 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|"]
2157 #[doc = "| 2 | Empty |"]
2158 #[doc = "| 3 | Empty |"]
2159 #[doc = "| 4 | Empty |"]
2160 #[doc = "| 5 | Empty |"]
2161 #[doc = "| 6 | Empty |"]
2162 #[doc = "| 7 | Empty |"]
2163 MAV_CMD_DO_SET_ROI_NONE = 197,
2164 #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2165 #[doc = ""]
2166 #[doc = "# Parameters"]
2167 #[doc = ""]
2168 #[doc = "| Parameter | Description | Values |"]
2169 #[doc = "| --------- | ----------- | ------ |"]
2170 #[doc = "| 1 (System ID)| System ID | 1, 2, .. , 255 |"]
2171 #[doc = "| 2 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| |"]
2172 MAV_CMD_DO_SET_ROI_SYSID = 198,
2173 #[doc = "Control onboard camera system."]
2174 #[doc = ""]
2175 #[doc = "# Parameters"]
2176 #[doc = ""]
2177 #[doc = "| Parameter | Description | Values | Units |"]
2178 #[doc = "| --------- | ----------- | ------ | ----- |"]
2179 #[doc = "| 1 (ID) | Camera ID (-1 for all)| -1, 0, .. | |"]
2180 #[doc = "| 2 (Transmission)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| 0, 1, 2 | |"]
2181 #[doc = "| 3 (Interval)| Transmission mode: 0: video stream,>0: single images every n seconds| ≥ 0 | s |"]
2182 #[doc = "| 4 (Recording)| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| 0, 1, 2 | |"]
2183 #[doc = "| 5 | Empty | | |"]
2184 #[doc = "| 6 | Empty | | |"]
2185 #[doc = "| 7 | Empty | | |"]
2186 MAV_CMD_DO_CONTROL_VIDEO = 200,
2187 #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Superseded since 2018-01)"]
2188 #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2189 #[doc = ""]
2190 #[doc = "# Parameters"]
2191 #[doc = ""]
2192 #[doc = "| Parameter | Description | Values |"]
2193 #[doc = "| --------- | ----------- | ------ |"]
2194 #[doc = "| 1 (ROI Mode)| Region of interest mode.| [`MavRoi`] |"]
2195 #[doc = "| 2 (WP Index)| Waypoint index/ target ID (depends on param 1).| 0, 1, .. |"]
2196 #[doc = "| 3 (ROI Index)| Region of interest index. (allows a vehicle to manage multiple ROI's)| 0, 1, .. |"]
2197 #[doc = "| 4 | Empty | |"]
2198 #[doc = "| 5 | MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| |"]
2199 #[doc = "| 6 | MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| |"]
2200 #[doc = "| 7 | MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| |"]
2201 MAV_CMD_DO_SET_ROI = 201,
2202 #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2203 #[doc = ""]
2204 #[doc = "# Parameters"]
2205 #[doc = ""]
2206 #[doc = "| Parameter | Description | Values | Units |"]
2207 #[doc = "| --------- | ----------- | ------ | ----- |"]
2208 #[doc = "| 1 (Mode) | Modes: P, TV, AV, M, Etc.| 0, 1, .. | |"]
2209 #[doc = "| 2 (Shutter Speed)| Shutter speed: Divisor number for one second.| 0, 1, .. | |"]
2210 #[doc = "| 3 (Aperture)| Aperture: F stop number.| ≥ 0 | |"]
2211 #[doc = "| 4 (ISO) | ISO number e.g. 80, 100, 200, Etc.| 0, 1, .. | |"]
2212 #[doc = "| 5 (Exposure)| Exposure type enumerator.| | |"]
2213 #[doc = "| 6 (Command Identity)| Command Identity.| | |"]
2214 #[doc = "| 7 (Engine Cut-off)| Main engine cut-off time before camera trigger. (0 means no cut-off)| 0, 1, .. | ds |"]
2215 MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
2216 #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2217 #[doc = ""]
2218 #[doc = "# Parameters"]
2219 #[doc = ""]
2220 #[doc = "| Parameter | Description |"]
2221 #[doc = "| --------- | ----------- |"]
2222 #[doc = "| 1 (Session Control)| Session control e.g. show/hide lens|"]
2223 #[doc = "| 2 (Zoom Absolute)| Zoom's absolute position|"]
2224 #[doc = "| 3 (Zoom Relative)| Zooming step value to offset zoom from the current position|"]
2225 #[doc = "| 4 (Focus) | Focus Locking, Unlocking or Re-locking|"]
2226 #[doc = "| 5 (Shoot Command)| Shooting Command|"]
2227 #[doc = "| 6 (Command Identity)| Command Identity|"]
2228 #[doc = "| 7 (Shot ID)| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.|"]
2229 MAV_CMD_DO_DIGICAM_CONTROL = 203,
2230 #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Superseded since 2020-01)"]
2231 #[doc = "Mission command to configure a camera or antenna mount"]
2232 #[doc = ""]
2233 #[doc = "# Parameters"]
2234 #[doc = ""]
2235 #[doc = "| Parameter | Description | Values |"]
2236 #[doc = "| --------- | ----------- | ------ |"]
2237 #[doc = "| 1 (Mode) | Mount operation mode| [`MavMountMode`] |"]
2238 #[doc = "| 2 (Stabilize Roll)| Stabilize roll (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2239 #[doc = "| 3 (Stabilize Pitch)| Stabilize pitch (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2240 #[doc = "| 4 (Stabilize Yaw)| Stabilize yaw (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2241 #[doc = "| 5 (Roll Input Mode)| Roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| |"]
2242 #[doc = "| 6 (Pitch Input Mode)| Pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| |"]
2243 #[doc = "| 7 (Yaw Input Mode)| Yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| |"]
2244 MAV_CMD_DO_MOUNT_CONFIGURE = 204,
2245 #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Superseded since 2020-01)"]
2246 #[doc = "Mission command to control a camera or antenna mount"]
2247 #[doc = ""]
2248 #[doc = "# Parameters"]
2249 #[doc = ""]
2250 #[doc = "| Parameter | Description | Values | Units |"]
2251 #[doc = "| --------- | ----------- | ------ | ----- |"]
2252 #[doc = "| 1 (Pitch) | pitch depending on mount mode (degrees or degrees/second depending on pitch input).| | |"]
2253 #[doc = "| 2 (Roll) | roll depending on mount mode (degrees or degrees/second depending on roll input).| | |"]
2254 #[doc = "| 3 (Yaw) | yaw depending on mount mode (degrees or degrees/second depending on yaw input).| | |"]
2255 #[doc = "| 4 (Altitude)| altitude depending on mount mode.| | m |"]
2256 #[doc = "| 5 (Latitude)| latitude, set if appropriate mount mode.| | |"]
2257 #[doc = "| 6 (Longitude)| longitude, set if appropriate mount mode.| | |"]
2258 #[doc = "| 7 (Mode) | Mount mode. | [`MavMountMode`] | |"]
2259 MAV_CMD_DO_MOUNT_CONTROL = 205,
2260 #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
2261 #[doc = ""]
2262 #[doc = "# Parameters"]
2263 #[doc = ""]
2264 #[doc = "| Parameter | Description | Values | Units |"]
2265 #[doc = "| --------- | ----------- | ------ | ----- |"]
2266 #[doc = "| 1 (Distance)| Camera trigger distance. 0 to stop triggering.| ≥ 0 | m |"]
2267 #[doc = "| 2 (Shutter)| Camera shutter integration time. -1 or 0 to ignore| -1, 0, .. | ms |"]
2268 #[doc = "| 3 (Trigger)| Trigger camera once, immediately (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] | |"]
2269 #[doc = "| 4 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 | |"]
2270 #[doc = "| 5 | Empty | | |"]
2271 #[doc = "| 6 | Empty | | |"]
2272 #[doc = "| 7 | Empty | | |"]
2273 MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
2274 #[doc = "Enable the geofence. This can be used in a mission or via the command protocol. The persistence/lifetime of the setting is undefined. Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission. Flight stacks typically reset the setting to system defaults on reboot."]
2275 #[doc = ""]
2276 #[doc = "# Parameters"]
2277 #[doc = ""]
2278 #[doc = "| Parameter | Description | Values |"]
2279 #[doc = "| --------- | ----------- | ------ |"]
2280 #[doc = "| 1 (Enable)| enable? (0=disable, 1=enable, 2=disable_floor_only)| 0, 1, 2 |"]
2281 #[doc = "| 2 (Types) | Fence types to enable or disable as a bitmask. 0: field is unused/all fences should be enabled or disabled (for compatibility reasons). Parameter is ignored if param1=2.| [`FenceType`] |"]
2282 #[doc = "| 3 | Empty | |"]
2283 #[doc = "| 4 | Empty | |"]
2284 #[doc = "| 5 | Empty | |"]
2285 #[doc = "| 6 | Empty | |"]
2286 #[doc = "| 7 | Empty | |"]
2287 MAV_CMD_DO_FENCE_ENABLE = 207,
2288 #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
2289 #[doc = ""]
2290 #[doc = "# Parameters"]
2291 #[doc = ""]
2292 #[doc = "| Parameter | Description | Values |"]
2293 #[doc = "| --------- | ----------- | ------ |"]
2294 #[doc = "| 1 (Action)| Action | [`ParachuteAction`] |"]
2295 #[doc = "| 2 | Empty | |"]
2296 #[doc = "| 3 | Empty | |"]
2297 #[doc = "| 4 | Empty | |"]
2298 #[doc = "| 5 | Empty | |"]
2299 #[doc = "| 6 | Empty | |"]
2300 #[doc = "| 7 | Empty | |"]
2301 MAV_CMD_DO_PARACHUTE = 208,
2302 #[doc = "Command to perform motor test."]
2303 #[doc = ""]
2304 #[doc = "# Parameters"]
2305 #[doc = ""]
2306 #[doc = "| Parameter | Description | Values | Units |"]
2307 #[doc = "| --------- | ----------- | ------ | ----- |"]
2308 #[doc = "| 1 (Instance)| Motor instance number (from 1 to max number of motors on the vehicle).| 1, 2, .. | |"]
2309 #[doc = "| 2 (Throttle Type)| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| [`MotorTestThrottleType`] | |"]
2310 #[doc = "| 3 (Throttle)| Throttle value.| | |"]
2311 #[doc = "| 4 (Timeout)| Timeout between tests that are run in sequence.| ≥ 0 | s |"]
2312 #[doc = "| 5 (Motor Count)| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| 0, 1, .. | |"]
2313 #[doc = "| 6 (Test Order)| Motor test order.| [`MotorTestOrder`] | |"]
2314 #[doc = "| 7 | Empty | | |"]
2315 MAV_CMD_DO_MOTOR_TEST = 209,
2316 #[doc = "Change to/from inverted flight."]
2317 #[doc = ""]
2318 #[doc = "# Parameters"]
2319 #[doc = ""]
2320 #[doc = "| Parameter | Description | Values |"]
2321 #[doc = "| --------- | ----------- | ------ |"]
2322 #[doc = "| 1 (Inverted)| Inverted flight (MAV_BOOL_False: normal flight). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2323 #[doc = "| 2 | Empty | |"]
2324 #[doc = "| 3 | Empty | |"]
2325 #[doc = "| 4 | Empty | |"]
2326 #[doc = "| 5 | Empty | |"]
2327 #[doc = "| 6 | Empty | |"]
2328 #[doc = "| 7 | Empty | |"]
2329 MAV_CMD_DO_INVERTED_FLIGHT = 210,
2330 #[doc = "Mission command to operate a gripper."]
2331 #[doc = ""]
2332 #[doc = "# Parameters"]
2333 #[doc = ""]
2334 #[doc = "| Parameter | Description | Values |"]
2335 #[doc = "| --------- | ----------- | ------ |"]
2336 #[doc = "| 1 (Gripper ID)| Gripper ID. 1-6 for an autopilot connected gripper. In missions this may be set to 1-6 for an autopilot gripper, or the gripper component id for a MAVLink gripper. 0 targets all grippers.| 0, 1, .. |"]
2337 #[doc = "| 2 (Action)| Gripper action to perform.| [`GripperActions`] |"]
2338 #[doc = "| 3 | Empty | |"]
2339 #[doc = "| 4 | Empty | |"]
2340 #[doc = "| 5 | Empty | |"]
2341 #[doc = "| 6 | Empty | |"]
2342 #[doc = "| 7 | Empty | |"]
2343 MAV_CMD_DO_GRIPPER = 211,
2344 #[doc = "Enable/disable autotune."]
2345 #[doc = ""]
2346 #[doc = "# Parameters"]
2347 #[doc = ""]
2348 #[doc = "| Parameter | Description | Values |"]
2349 #[doc = "| --------- | ----------- | ------ |"]
2350 #[doc = "| 1 (Enable)| Enable autotune (MAV_BOOL_FALSE: disable autotune). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2351 #[doc = "| 2 (Axis) | Specify axes for which autotuning is enabled/disabled. 0 indicates the field is unused (for compatibility reasons). If 0 the autopilot will follow its default behaviour, which is usually to tune all axes.| [`AutotuneAxis`] |"]
2352 #[doc = "| 3 | Empty. | |"]
2353 #[doc = "| 4 | Empty. | |"]
2354 #[doc = "| 5 | Empty. | |"]
2355 #[doc = "| 6 | Empty. | |"]
2356 #[doc = "| 7 | Empty. | |"]
2357 MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
2358 #[doc = "Sets a desired vehicle turn angle and speed change."]
2359 #[doc = ""]
2360 #[doc = "# Parameters"]
2361 #[doc = ""]
2362 #[doc = "| Parameter | Description | Values | Units |"]
2363 #[doc = "| --------- | ----------- | ------ | ----- |"]
2364 #[doc = "| 1 (Yaw) | Yaw angle to adjust steering by.| | deg |"]
2365 #[doc = "| 2 (Speed) | Speed. | | m/s |"]
2366 #[doc = "| 3 (Angle) | Relative final angle (MAV_BOOL_FALSE: Absolute angle). Values not equal to 0 or 1 are invalid.| [`MavBool`] | |"]
2367 #[doc = "| 4 | Empty | | |"]
2368 #[doc = "| 5 | Empty | | |"]
2369 #[doc = "| 6 | Empty | | |"]
2370 #[doc = "| 7 | Empty | | |"]
2371 MAV_CMD_NAV_SET_YAW_SPEED = 213,
2372 #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
2373 #[doc = ""]
2374 #[doc = "# Parameters"]
2375 #[doc = ""]
2376 #[doc = "| Parameter | Description | Values | Units |"]
2377 #[doc = "| --------- | ----------- | ------ | ----- |"]
2378 #[doc = "| 1 (Trigger Cycle)| Camera trigger cycle time. -1 or 0 to ignore.| -1, 0, .. | ms |"]
2379 #[doc = "| 2 (Shutter Integration)| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| -1, 0, .. | ms |"]
2380 #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 | |"]
2381 #[doc = "| 4 | Empty | | |"]
2382 #[doc = "| 5 | Empty | | |"]
2383 #[doc = "| 6 | Empty | | |"]
2384 #[doc = "| 7 | Empty | | |"]
2385 MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
2386 #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Superseded since 2020-01)"]
2387 #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
2388 #[doc = ""]
2389 #[doc = "# Parameters"]
2390 #[doc = ""]
2391 #[doc = "| Parameter | Description |"]
2392 #[doc = "| --------- | ----------- |"]
2393 #[doc = "| 1 (Q1) | quaternion param q1, w (1 in null-rotation)|"]
2394 #[doc = "| 2 (Q2) | quaternion param q2, x (0 in null-rotation)|"]
2395 #[doc = "| 3 (Q3) | quaternion param q3, y (0 in null-rotation)|"]
2396 #[doc = "| 4 (Q4) | quaternion param q4, z (0 in null-rotation)|"]
2397 #[doc = "| 5 | Empty |"]
2398 #[doc = "| 6 | Empty |"]
2399 #[doc = "| 7 | Empty |"]
2400 MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
2401 #[doc = "set id of master controller"]
2402 #[doc = ""]
2403 #[doc = "# Parameters"]
2404 #[doc = ""]
2405 #[doc = "| Parameter | Description | Values |"]
2406 #[doc = "| --------- | ----------- | ------ |"]
2407 #[doc = "| 1 (System ID)| System ID | 0, 1, .. , 255 |"]
2408 #[doc = "| 2 (Component ID)| Component ID| 0, 1, .. , 255 |"]
2409 #[doc = "| 3 | Empty | |"]
2410 #[doc = "| 4 | Empty | |"]
2411 #[doc = "| 5 | Empty | |"]
2412 #[doc = "| 6 | Empty | |"]
2413 #[doc = "| 7 | Empty | |"]
2414 MAV_CMD_DO_GUIDED_MASTER = 221,
2415 #[doc = "Set limits for external control"]
2416 #[doc = ""]
2417 #[doc = "# Parameters"]
2418 #[doc = ""]
2419 #[doc = "| Parameter | Description | Values | Units |"]
2420 #[doc = "| --------- | ----------- | ------ | ----- |"]
2421 #[doc = "| 1 (Timeout)| Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| ≥ 0 | s |"]
2422 #[doc = "| 2 (Min Altitude)| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| | m |"]
2423 #[doc = "| 3 (Max Altitude)| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| | m |"]
2424 #[doc = "| 4 (Horiz. Move Limit)| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| ≥ 0 | m |"]
2425 #[doc = "| 5 | Empty | | |"]
2426 #[doc = "| 6 | Empty | | |"]
2427 #[doc = "| 7 | Empty | | |"]
2428 MAV_CMD_DO_GUIDED_LIMITS = 222,
2429 #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
2430 #[doc = ""]
2431 #[doc = "# Parameters"]
2432 #[doc = ""]
2433 #[doc = "| Parameter | Description | Values | Units |"]
2434 #[doc = "| --------- | ----------- | ------ | ----- |"]
2435 #[doc = "| 1 (Start Engine)| Start engine (MAV_BOOL_False: Stop engine). Values not equal to 0 or 1 are invalid.| [`MavBool`] | |"]
2436 #[doc = "| 2 (Cold Start)| Cold start engine (MAV_BOOL_FALSE: Warm start). Values not equal to 0 or 1 are invalid. Controls use of choke where applicable| [`MavBool`] | |"]
2437 #[doc = "| 3 (Height Delay)| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| ≥ 0 | m |"]
2438 #[doc = "| 4 (Options)| A bitmask of options for engine control| [`EngineControlOptions`] | |"]
2439 #[doc = "| 5 | Empty | | |"]
2440 #[doc = "| 6 | Empty | | |"]
2441 #[doc = "| 7 | Empty | | |"]
2442 MAV_CMD_DO_ENGINE_CONTROL = 223,
2443 #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2). This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. If the system is not in mission mode this command must not trigger a switch to mission mode. The mission may be \"reset\" using param2. Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`). Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode. \t The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
2444 #[doc = ""]
2445 #[doc = "# Parameters"]
2446 #[doc = ""]
2447 #[doc = "| Parameter | Description | Values |"]
2448 #[doc = "| --------- | ----------- | ------ |"]
2449 #[doc = "| 1 (Number)| Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| -1, 0, .. |"]
2450 #[doc = "| 2 (Reset Mission)| Reset mission (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid. Resets jump counters to initial values and changes mission state \"completed\" to be \"active\" or \"paused\".| [`MavBool`] |"]
2451 #[doc = "| 3 | Empty | |"]
2452 #[doc = "| 4 | Empty | |"]
2453 #[doc = "| 5 | Empty | |"]
2454 #[doc = "| 6 | Empty | |"]
2455 #[doc = "| 7 | Empty | |"]
2456 MAV_CMD_DO_SET_MISSION_CURRENT = 224,
2457 #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
2458 #[doc = ""]
2459 #[doc = "# Parameters"]
2460 #[doc = ""]
2461 #[doc = "| Parameter | Description |"]
2462 #[doc = "| --------- | ----------- |"]
2463 #[doc = "| 1 | Empty |"]
2464 #[doc = "| 2 | Empty |"]
2465 #[doc = "| 3 | Empty |"]
2466 #[doc = "| 4 | Empty |"]
2467 #[doc = "| 5 | Empty |"]
2468 #[doc = "| 6 | Empty |"]
2469 #[doc = "| 7 | Empty |"]
2470 MAV_CMD_DO_LAST = 240,
2471 #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
2472 #[doc = ""]
2473 #[doc = "# Parameters"]
2474 #[doc = ""]
2475 #[doc = "| Parameter | Description | Values |"]
2476 #[doc = "| --------- | ----------- | ------ |"]
2477 #[doc = "| 1 (Gyro Temperature)| 1: gyro calibration, 3: gyro temperature calibration| 0, 1, .. , 3 |"]
2478 #[doc = "| 2 (Magnetometer)| Magnetometer calibration. Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2479 #[doc = "| 3 (Ground Pressure)| Ground pressure calibration. Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2480 #[doc = "| 4 (Remote Control)| 1: radio RC calibration, 2: RC trim calibration| 0, 1 |"]
2481 #[doc = "| 5 (Accelerometer)| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 0, 1, .. , 4 |"]
2482 #[doc = "| 6 (Compmot or Airspeed)| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 0, 1, 2 |"]
2483 #[doc = "| 7 (ESC or Baro)| 1: ESC calibration, 3: barometer temperature calibration| 0, 1, .. , 3 |"]
2484 MAV_CMD_PREFLIGHT_CALIBRATION = 241,
2485 #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
2486 #[doc = ""]
2487 #[doc = "# Parameters"]
2488 #[doc = ""]
2489 #[doc = "| Parameter | Description | Values |"]
2490 #[doc = "| --------- | ----------- | ------ |"]
2491 #[doc = "| 1 (Sensor Type)| Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| 0, 1, .. , 6 |"]
2492 #[doc = "| 2 (X Offset)| X axis offset (or generic dimension 1), in the sensor's raw units| |"]
2493 #[doc = "| 3 (Y Offset)| Y axis offset (or generic dimension 2), in the sensor's raw units| |"]
2494 #[doc = "| 4 (Z Offset)| Z axis offset (or generic dimension 3), in the sensor's raw units| |"]
2495 #[doc = "| 5 (4th Dimension)| Generic dimension 4, in the sensor's raw units| |"]
2496 #[doc = "| 6 (5th Dimension)| Generic dimension 5, in the sensor's raw units| |"]
2497 #[doc = "| 7 (6th Dimension)| Generic dimension 6, in the sensor's raw units| |"]
2498 MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
2499 #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
2500 #[doc = ""]
2501 #[doc = "# Parameters"]
2502 #[doc = ""]
2503 #[doc = "| Parameter | Description |"]
2504 #[doc = "| --------- | ----------- |"]
2505 #[doc = "| 1 (Actuator ID)| 1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.|"]
2506 #[doc = "| 2 | Reserved |"]
2507 #[doc = "| 3 | Reserved |"]
2508 #[doc = "| 4 | Reserved |"]
2509 #[doc = "| 5 | Reserved |"]
2510 #[doc = "| 6 | Reserved |"]
2511 #[doc = "| 7 | Reserved |"]
2512 MAV_CMD_PREFLIGHT_UAVCAN = 243,
2513 #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
2514 #[doc = ""]
2515 #[doc = "# Parameters"]
2516 #[doc = ""]
2517 #[doc = "| Parameter | Description | Values | Units |"]
2518 #[doc = "| --------- | ----------- | ------ | ----- |"]
2519 #[doc = "| 1 (Parameter Storage)| Action to perform on the persistent parameter storage| [`PreflightStorageParameterAction`] | |"]
2520 #[doc = "| 2 (Mission Storage)| Action to perform on the persistent mission storage| [`PreflightStorageMissionAction`] | |"]
2521 #[doc = "| 3 (Logging Rate)| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging,>1: logging rate (e.g. set to 1000 for 1000 Hz logging)| -1, 0, .. | Hz |"]
2522 #[doc = "| 4 | Reserved | | |"]
2523 #[doc = "| 5 | Empty | | |"]
2524 #[doc = "| 6 | Empty | | |"]
2525 #[doc = "| 7 | Empty | | |"]
2526 MAV_CMD_PREFLIGHT_STORAGE = 245,
2527 #[doc = "Request the reboot or shutdown of system components."]
2528 #[doc = ""]
2529 #[doc = "# Parameters"]
2530 #[doc = ""]
2531 #[doc = "| Parameter | Description | Values |"]
2532 #[doc = "| --------- | ----------- | ------ |"]
2533 #[doc = "| 1 (Autopilot)| Action to take for autopilot.| [`RebootShutdownAction`] |"]
2534 #[doc = "| 2 (Companion)| Action to take for onboard computer.| [`RebootShutdownAction`] |"]
2535 #[doc = "| 3 (Component Action)| Action to take for component specified in param4.| [`RebootShutdownAction`] |"]
2536 #[doc = "| 4 (Component ID)| MAVLink Component ID targeted in param3 (0 for all components).| 0, 1, .. , 255 |"]
2537 #[doc = "| 5 | Reserved (set to 0)| |"]
2538 #[doc = "| 6 (Conditions)| Conditions under which reboot/shutdown is allowed.| [`RebootShutdownConditions`] |"]
2539 #[doc = "| 7 | WIP: ID (e.g. camera ID -1 for all IDs)| |"]
2540 MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
2541 #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
2542 #[doc = ""]
2543 #[doc = "# Parameters"]
2544 #[doc = ""]
2545 #[doc = "| Parameter | Description | Values | Units |"]
2546 #[doc = "| --------- | ----------- | ------ | ----- |"]
2547 #[doc = "| 1 (Continue)| MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| [`MavGoto`] | |"]
2548 #[doc = "| 2 (Position)| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| [`MavGoto`] | |"]
2549 #[doc = "| 3 (Frame) | Coordinate frame of hold point.| [`MavFrame`] | |"]
2550 #[doc = "| 4 (Yaw) | Desired yaw angle.| | deg |"]
2551 #[doc = "| 5 (Latitude/X)| Latitude/X position.| | |"]
2552 #[doc = "| 6 (Longitude/Y)| Longitude/Y position.| | |"]
2553 #[doc = "| 7 (Altitude/Z)| Altitude/Z position.| | |"]
2554 MAV_CMD_OVERRIDE_GOTO = 252,
2555 #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
2556 #[doc = ""]
2557 #[doc = "# Parameters"]
2558 #[doc = ""]
2559 #[doc = "| Parameter | Description | Values | Units |"]
2560 #[doc = "| --------- | ----------- | ------ | ----- |"]
2561 #[doc = "| 1 (Distance)| Camera trigger distance. 0 to stop triggering.| ≥ 0 | m |"]
2562 #[doc = "| 2 (Shutter)| Camera shutter integration time. 0 to ignore| 0, 1, .. | ms |"]
2563 #[doc = "| 3 (Min Interval)| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| 0, 1, .. , 10000 | ms |"]
2564 #[doc = "| 4 (Positions)| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| 2, 3, .. | |"]
2565 #[doc = "| 5 (Roll Angle)| Angle limits that the camera can be rolled to left and right of center.| ≥ 0 | deg |"]
2566 #[doc = "| 6 (Pitch Angle)| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| -180 .. 180 | deg |"]
2567 #[doc = "| 7 | Empty | | |"]
2568 MAV_CMD_OBLIQUE_SURVEY = 260,
2569 #[doc = "Enable the specified standard MAVLink mode. If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED. See <https://mavlink.io/en/services/standard_modes.html>"]
2570 #[doc = ""]
2571 #[doc = "# Parameters"]
2572 #[doc = ""]
2573 #[doc = "| Parameter | Description | Values |"]
2574 #[doc = "| --------- | ----------- | ------ |"]
2575 #[doc = "| 1 (Standard Mode)| The mode to set.| [`MavStandardMode`] |"]
2576 #[doc = "| 2 | | Reserved (use 0) |"]
2577 #[doc = "| 3 | | Reserved (use 0) |"]
2578 #[doc = "| 4 | | Reserved (use 0) |"]
2579 #[doc = "| 5 | | Reserved (use 0) |"]
2580 #[doc = "| 6 | | Reserved (use 0) |"]
2581 #[doc = "| 7 | | Reserved (use NaN) |"]
2582 MAV_CMD_DO_SET_STANDARD_MODE = 262,
2583 #[doc = "start running a mission"]
2584 #[doc = ""]
2585 #[doc = "# Parameters"]
2586 #[doc = ""]
2587 #[doc = "| Parameter | Description | Values |"]
2588 #[doc = "| --------- | ----------- | ------ |"]
2589 #[doc = "| 1 (First Item)| first_item: the first mission item to run| 0, 1, .. |"]
2590 #[doc = "| 2 (Last Item)| last_item: the last mission item to run (after this item is run, the mission ends)| 0, 1, .. |"]
2591 MAV_CMD_MISSION_START = 300,
2592 #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
2593 #[doc = ""]
2594 #[doc = "# Parameters"]
2595 #[doc = ""]
2596 #[doc = "| Parameter | Description | Values | Units |"]
2597 #[doc = "| --------- | ----------- | ------ | ----- |"]
2598 #[doc = "| 1 (Value) | Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| -1 .. 1 | |"]
2599 #[doc = "| 2 (Timeout)| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| 0 .. 3 | s |"]
2600 #[doc = "| 3 | | Reserved (use 0) | |"]
2601 #[doc = "| 4 | | Reserved (use 0) | |"]
2602 #[doc = "| 5 (Output Function)| Actuator Output function| [`ActuatorOutputFunction`] | |"]
2603 #[doc = "| 6 | | Reserved (use 0) | |"]
2604 #[doc = "| 7 | | Reserved (use 0) | |"]
2605 MAV_CMD_ACTUATOR_TEST = 310,
2606 #[doc = "Actuator configuration command."]
2607 #[doc = ""]
2608 #[doc = "# Parameters"]
2609 #[doc = ""]
2610 #[doc = "| Parameter | Description | Values |"]
2611 #[doc = "| --------- | ----------- | ------ |"]
2612 #[doc = "| 1 (Configuration)| Actuator configuration action| [`ActuatorConfiguration`] |"]
2613 #[doc = "| 2 | | Reserved (use 0) |"]
2614 #[doc = "| 3 | | Reserved (use 0) |"]
2615 #[doc = "| 4 | | Reserved (use 0) |"]
2616 #[doc = "| 5 (Output Function)| Actuator Output function| [`ActuatorOutputFunction`] |"]
2617 #[doc = "| 6 | | Reserved (use 0) |"]
2618 #[doc = "| 7 | | Reserved (use 0) |"]
2619 MAV_CMD_CONFIGURE_ACTUATOR = 311,
2620 #[doc = "Arms / Disarms a component"]
2621 #[doc = ""]
2622 #[doc = "# Parameters"]
2623 #[doc = ""]
2624 #[doc = "| Parameter | Description | Values |"]
2625 #[doc = "| --------- | ----------- | ------ |"]
2626 #[doc = "| 1 (Arm) | Arm (MAV_BOOL_FALSE: disarm). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2627 #[doc = "| 2 (Force) | 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| 0, 21196 |"]
2628 MAV_CMD_COMPONENT_ARM_DISARM = 400,
2629 #[doc = "Instructs a target system to run pre-arm checks. This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed. This command should return MAV_RESULT_ACCEPTED if it will run the checks. The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific). The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
2630 MAV_CMD_RUN_PREARM_CHECKS = 401,
2631 #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2632 #[doc = ""]
2633 #[doc = "# Parameters"]
2634 #[doc = ""]
2635 #[doc = "| Parameter | Description | Values |"]
2636 #[doc = "| --------- | ----------- | ------ |"]
2637 #[doc = "| 1 (Enable)| Illuminators on/off (MAV_BOOL_TRUE: illuminators on). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2638 MAV_CMD_ILLUMINATOR_ON_OFF = 405,
2639 #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2640 #[doc = ""]
2641 #[doc = "# Parameters"]
2642 #[doc = ""]
2643 #[doc = "| Parameter | Description | Values | Units |"]
2644 #[doc = "| --------- | ----------- | ------ | ----- |"]
2645 #[doc = "| 1 (Mode) | Mode | [`IlluminatorMode`] | |"]
2646 #[doc = "| 2 (Brightness)| 0%: Off, 100%: Max Brightness| 0 .. 100 | % |"]
2647 #[doc = "| 3 (Strobe Period)| Strobe period in seconds where 0 means strobing is not used| ≥ 0 | s |"]
2648 #[doc = "| 4 (Strobe Duty)| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| 0 .. 100 | % |"]
2649 MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
2650 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2022-04)"]
2651 #[doc = "Request the home position from the vehicle. The vehicle will ACK the command and then emit the HOME_POSITION message."]
2652 #[doc = ""]
2653 #[doc = "# Parameters"]
2654 #[doc = ""]
2655 #[doc = "| Parameter | Description |"]
2656 #[doc = "| --------- | ----------- |"]
2657 #[doc = "| 1 | Reserved |"]
2658 #[doc = "| 2 | Reserved |"]
2659 #[doc = "| 3 | Reserved |"]
2660 #[doc = "| 4 | Reserved |"]
2661 #[doc = "| 5 | Reserved |"]
2662 #[doc = "| 6 | Reserved |"]
2663 #[doc = "| 7 | Reserved |"]
2664 MAV_CMD_GET_HOME_POSITION = 410,
2665 #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
2666 #[doc = ""]
2667 #[doc = "# Parameters"]
2668 #[doc = ""]
2669 #[doc = "| Parameter | Description | Values |"]
2670 #[doc = "| --------- | ----------- | ------ |"]
2671 #[doc = "| 1 (Failure unit)| The unit which is affected by the failure.| [`FailureUnit`] |"]
2672 #[doc = "| 2 (Failure type)| The type how the failure manifests itself.| [`FailureType`] |"]
2673 #[doc = "| 3 (Instance)| Instance affected by failure (0 to signal all).| |"]
2674 MAV_CMD_INJECT_FAILURE = 420,
2675 #[doc = "Starts receiver pairing."]
2676 #[doc = ""]
2677 #[doc = "# Parameters"]
2678 #[doc = ""]
2679 #[doc = "| Parameter | Description | Values |"]
2680 #[doc = "| --------- | ----------- | ------ |"]
2681 #[doc = "| 1 (RC Type)| RC type. | [`RcType`] |"]
2682 #[doc = "| 2 (RC Sub Type)| RC sub type.| [`RcSubType`] |"]
2683 MAV_CMD_START_RX_PAIR = 500,
2684 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2022-04)"]
2685 #[doc = "Request the interval between messages for a particular MAVLink message ID. The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
2686 #[doc = ""]
2687 #[doc = "# Parameters"]
2688 #[doc = ""]
2689 #[doc = "| Parameter | Description | Values |"]
2690 #[doc = "| --------- | ----------- | ------ |"]
2691 #[doc = "| 1 (Message ID)| The MAVLink message ID| 0, 1, .. , 16777215 |"]
2692 MAV_CMD_GET_MESSAGE_INTERVAL = 510,
2693 #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
2694 #[doc = ""]
2695 #[doc = "# Parameters"]
2696 #[doc = ""]
2697 #[doc = "| Parameter | Description | Values | Units |"]
2698 #[doc = "| --------- | ----------- | ------ | ----- |"]
2699 #[doc = "| 1 (Message ID)| The MAVLink message ID| 0, 1, .. , 16777215 | |"]
2700 #[doc = "| 2 (Interval)| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| -1, 0, .. | us |"]
2701 #[doc = "| 3 (Req Param 3)| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0). When used as an index ID, 0 means \"all instances\", \"1\" means the first instance in the sequence (the emitted message will have an id of 0 if message ids are 0-indexed, or 1 if index numbers start from one).| | |"]
2702 #[doc = "| 4 (Req Param 4)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| | |"]
2703 #[doc = "| 5 (Req Param 5)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0/NaN).| | |"]
2704 #[doc = "| 6 (Req Param 6)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0/NaN).| | |"]
2705 #[doc = "| 7 (Response Target)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requester, 2: broadcast.| 0, 1, 2 | |"]
2706 MAV_CMD_SET_MESSAGE_INTERVAL = 511,
2707 #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
2708 #[doc = ""]
2709 #[doc = "# Parameters"]
2710 #[doc = ""]
2711 #[doc = "| Parameter | Description | Values |"]
2712 #[doc = "| --------- | ----------- | ------ |"]
2713 #[doc = "| 1 (Message ID)| The MAVLink message ID of the requested message.| 0, 1, .. , 16777215 |"]
2714 #[doc = "| 2 (Req Param 1)| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| |"]
2715 #[doc = "| 3 (Req Param 2)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| |"]
2716 #[doc = "| 4 (Req Param 3)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| |"]
2717 #[doc = "| 5 (Req Param 4)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| |"]
2718 #[doc = "| 6 (Req Param 5)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| |"]
2719 #[doc = "| 7 (Response Target)| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requester, 2: broadcast.| 0, 1, 2 |"]
2720 MAV_CMD_REQUEST_MESSAGE = 512,
2721 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2025-11)"]
2722 #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
2723 #[doc = ""]
2724 #[doc = "# Parameters"]
2725 #[doc = ""]
2726 #[doc = "| Parameter | Description | Values |"]
2727 #[doc = "| --------- | ----------- | ------ |"]
2728 #[doc = "| 1 (Protocol)| Request supported protocol versions by all nodes on the network (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2729 #[doc = "| 2 | Reserved (all remaining params)| |"]
2730 MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
2731 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2019-08)"]
2732 #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
2733 #[doc = ""]
2734 #[doc = "# Parameters"]
2735 #[doc = ""]
2736 #[doc = "| Parameter | Description | Values |"]
2737 #[doc = "| --------- | ----------- | ------ |"]
2738 #[doc = "| 1 (Version)| Request autopilot version (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2739 #[doc = "| 2 | Reserved (all remaining params)| |"]
2740 MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
2741 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2019-08)"]
2742 #[doc = "Request camera information (CAMERA_INFORMATION)."]
2743 #[doc = ""]
2744 #[doc = "# Parameters"]
2745 #[doc = ""]
2746 #[doc = "| Parameter | Description | Values |"]
2747 #[doc = "| --------- | ----------- | ------ |"]
2748 #[doc = "| 1 (Capabilities)| Request camera capabilities (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2749 #[doc = "| 2 | Reserved (all remaining params)| |"]
2750 MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
2751 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2019-08)"]
2752 #[doc = "Request camera settings (CAMERA_SETTINGS)."]
2753 #[doc = ""]
2754 #[doc = "# Parameters"]
2755 #[doc = ""]
2756 #[doc = "| Parameter | Description | Values |"]
2757 #[doc = "| --------- | ----------- | ------ |"]
2758 #[doc = "| 1 (Settings)| Request camera settings (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2759 #[doc = "| 2 | Reserved (all remaining params)| |"]
2760 MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
2761 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2019-08)"]
2762 #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
2763 #[doc = ""]
2764 #[doc = "# Parameters"]
2765 #[doc = ""]
2766 #[doc = "| Parameter | Description | Values |"]
2767 #[doc = "| --------- | ----------- | ------ |"]
2768 #[doc = "| 1 (Storage ID)| Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
2769 #[doc = "| 2 (Information)| Request storage information (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2770 #[doc = "| 3 | Reserved (all remaining params)| |"]
2771 MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
2772 #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
2773 #[doc = ""]
2774 #[doc = "# Parameters"]
2775 #[doc = ""]
2776 #[doc = "| Parameter | Description | Values |"]
2777 #[doc = "| --------- | ----------- | ------ |"]
2778 #[doc = "| 1 (Storage ID)| Storage ID (1 for first, 2 for second, etc.)| 0, 1, .. |"]
2779 #[doc = "| 2 (Format)| Format storage (and reset image log). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2780 #[doc = "| 3 (Reset Image Log)| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2781 #[doc = "| 4 | Reserved (all remaining params)| |"]
2782 MAV_CMD_STORAGE_FORMAT = 526,
2783 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2019-08)"]
2784 #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
2785 #[doc = ""]
2786 #[doc = "# Parameters"]
2787 #[doc = ""]
2788 #[doc = "| Parameter | Description | Values |"]
2789 #[doc = "| --------- | ----------- | ------ |"]
2790 #[doc = "| 1 (Capture Status)| Request camera capture status (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2791 #[doc = "| 2 | Reserved (all remaining params)| |"]
2792 MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
2793 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2019-08)"]
2794 #[doc = "Request flight information (FLIGHT_INFORMATION)"]
2795 #[doc = ""]
2796 #[doc = "# Parameters"]
2797 #[doc = ""]
2798 #[doc = "| Parameter | Description | Values |"]
2799 #[doc = "| --------- | ----------- | ------ |"]
2800 #[doc = "| 1 (Flight Information)| Request flight information (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2801 #[doc = "| 2 | Reserved (all remaining params)| |"]
2802 MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
2803 #[doc = "Reset all camera settings to Factory Default"]
2804 #[doc = ""]
2805 #[doc = "# Parameters"]
2806 #[doc = ""]
2807 #[doc = "| Parameter | Description | Values |"]
2808 #[doc = "| --------- | ----------- | ------ |"]
2809 #[doc = "| 1 (Reset) | Reset all settings (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
2810 #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2811 MAV_CMD_RESET_CAMERA_SETTINGS = 529,
2812 #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
2813 #[doc = ""]
2814 #[doc = "# Parameters"]
2815 #[doc = ""]
2816 #[doc = "| Parameter | Description | Values |"]
2817 #[doc = "| --------- | ----------- | ------ |"]
2818 #[doc = "| 1 (id) | Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2819 #[doc = "| 2 (Camera Mode)| Camera mode | [`CameraMode`] |"]
2820 #[doc = "| 3 | | Reserved (use NaN) |"]
2821 #[doc = "| 4 | | Reserved (use NaN) |"]
2822 #[doc = "| 5 | | |"]
2823 #[doc = "| 6 | | |"]
2824 #[doc = "| 7 | | Reserved (use NaN) |"]
2825 MAV_CMD_SET_CAMERA_MODE = 530,
2826 #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2827 #[doc = ""]
2828 #[doc = "# Parameters"]
2829 #[doc = ""]
2830 #[doc = "| Parameter | Description | Values |"]
2831 #[doc = "| --------- | ----------- | ------ |"]
2832 #[doc = "| 1 (Zoom Type)| Zoom type | [`CameraZoomType`] |"]
2833 #[doc = "| 2 (Zoom Value)| Zoom value. The range of valid values depend on the zoom type.| |"]
2834 #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2835 #[doc = "| 4 | | Reserved (use NaN) |"]
2836 MAV_CMD_SET_CAMERA_ZOOM = 531,
2837 #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2838 #[doc = ""]
2839 #[doc = "# Parameters"]
2840 #[doc = ""]
2841 #[doc = "| Parameter | Description | Values |"]
2842 #[doc = "| --------- | ----------- | ------ |"]
2843 #[doc = "| 1 (Focus Type)| Focus type | [`SetFocusType`] |"]
2844 #[doc = "| 2 (Focus Value)| Focus value | |"]
2845 #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2846 #[doc = "| 4 | | Reserved (use NaN) |"]
2847 MAV_CMD_SET_CAMERA_FOCUS = 532,
2848 #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos). There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage. If no flag is set the system should use its default storage. A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED. A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
2849 #[doc = ""]
2850 #[doc = "# Parameters"]
2851 #[doc = ""]
2852 #[doc = "| Parameter | Description | Values |"]
2853 #[doc = "| --------- | ----------- | ------ |"]
2854 #[doc = "| 1 (Storage ID)| Storage ID (1 for first, 2 for second, etc.)| 0, 1, .. |"]
2855 #[doc = "| 2 (Usage) | Usage flags | [`StorageUsageFlag`] |"]
2856 MAV_CMD_SET_STORAGE_USAGE = 533,
2857 #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
2858 #[doc = ""]
2859 #[doc = "# Parameters"]
2860 #[doc = ""]
2861 #[doc = "| Parameter | Description | Values |"]
2862 #[doc = "| --------- | ----------- | ------ |"]
2863 #[doc = "| 1 (device id)| Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.| |"]
2864 #[doc = "| 2 (primary source)| Primary Source| [`CameraSource`] |"]
2865 #[doc = "| 3 (secondary source)| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| [`CameraSource`] |"]
2866 MAV_CMD_SET_CAMERA_SOURCE = 534,
2867 #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
2868 #[doc = ""]
2869 #[doc = "# Parameters"]
2870 #[doc = ""]
2871 #[doc = "| Parameter | Description | Values |"]
2872 #[doc = "| --------- | ----------- | ------ |"]
2873 #[doc = "| 1 (Tag) | Tag. | 0, 1, .. |"]
2874 MAV_CMD_JUMP_TAG = 600,
2875 #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
2876 #[doc = ""]
2877 #[doc = "# Parameters"]
2878 #[doc = ""]
2879 #[doc = "| Parameter | Description | Values |"]
2880 #[doc = "| --------- | ----------- | ------ |"]
2881 #[doc = "| 1 (Tag) | Target tag to jump to.| 0, 1, .. |"]
2882 #[doc = "| 2 (Repeat)| Repeat count.| 0, 1, .. |"]
2883 MAV_CMD_DO_JUMP_TAG = 601,
2884 #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
2885 #[doc = ""]
2886 #[doc = "# Parameters"]
2887 #[doc = ""]
2888 #[doc = "| Parameter | Description | Values | Units |"]
2889 #[doc = "| --------- | ----------- | ------ | ----- |"]
2890 #[doc = "| 1 (Pitch angle)| Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| -180 .. 180 | deg |"]
2891 #[doc = "| 2 (Yaw angle)| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| -180 .. 180 | deg |"]
2892 #[doc = "| 3 (Pitch rate)| Pitch rate (positive to pitch up).| | deg/s |"]
2893 #[doc = "| 4 (Yaw rate)| Yaw rate (positive to yaw to the right).| | deg/s |"]
2894 #[doc = "| 5 (Gimbal manager flags)| Gimbal manager flags to use.| [`GimbalManagerFlags`] | |"]
2895 #[doc = "| 6 | | | |"]
2896 #[doc = "| 7 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| | |"]
2897 MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
2898 #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
2899 #[doc = ""]
2900 #[doc = "# Parameters"]
2901 #[doc = ""]
2902 #[doc = "| Parameter | Description |"]
2903 #[doc = "| --------- | ----------- |"]
2904 #[doc = "| 1 (sysid primary control)| Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2905 #[doc = "| 2 (compid primary control)| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2906 #[doc = "| 3 (sysid secondary control)| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2907 #[doc = "| 4 (compid secondary control)| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2908 #[doc = "| 5 | |"]
2909 #[doc = "| 6 | |"]
2910 #[doc = "| 7 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|"]
2911 MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
2912 #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture. Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). It is also needed to specify the target camera in missions. When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). If the param1 is 0 the autopilot should do both. When sent in a command the target MAVLink address is set using target_component. If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2913 #[doc = ""]
2914 #[doc = "# Parameters"]
2915 #[doc = ""]
2916 #[doc = "| Parameter | Description | Values | Units |"]
2917 #[doc = "| --------- | ----------- | ------ | ----- |"]
2918 #[doc = "| 1 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 | |"]
2919 #[doc = "| 2 (Interval)| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| ≥ 0 | s |"]
2920 #[doc = "| 3 (Total Images)| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| 0, 1, .. | |"]
2921 #[doc = "| 4 (Sequence Number)| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| 1, 2, .. | |"]
2922 #[doc = "| 5 | | | |"]
2923 #[doc = "| 6 | | | |"]
2924 #[doc = "| 7 | | Reserved (use NaN) | |"]
2925 MAV_CMD_IMAGE_START_CAPTURE = 2000,
2926 #[doc = "Stop image capture sequence. Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID. It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID). It is also needed to specify the target camera in missions. When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero). If the param1 is 0 the autopilot should do both. When sent in a command the target MAVLink address is set using target_component. If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist). If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED. If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2927 #[doc = ""]
2928 #[doc = "# Parameters"]
2929 #[doc = ""]
2930 #[doc = "| Parameter | Description | Values |"]
2931 #[doc = "| --------- | ----------- | ------ |"]
2932 #[doc = "| 1 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2933 #[doc = "| 2 | | Reserved (use NaN) |"]
2934 #[doc = "| 3 | | Reserved (use NaN) |"]
2935 #[doc = "| 4 | | Reserved (use NaN) |"]
2936 #[doc = "| 5 | | |"]
2937 #[doc = "| 6 | | |"]
2938 #[doc = "| 7 | | Reserved (use NaN) |"]
2939 MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
2940 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2019-08)"]
2941 #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
2942 #[doc = ""]
2943 #[doc = "# Parameters"]
2944 #[doc = ""]
2945 #[doc = "| Parameter | Description | Values |"]
2946 #[doc = "| --------- | ----------- | ------ |"]
2947 #[doc = "| 1 (Number)| Sequence number for missing CAMERA_IMAGE_CAPTURED message| 0, 1, .. |"]
2948 #[doc = "| 2 | | Reserved (use NaN) |"]
2949 #[doc = "| 3 | | Reserved (use NaN) |"]
2950 #[doc = "| 4 | | Reserved (use NaN) |"]
2951 #[doc = "| 5 | | |"]
2952 #[doc = "| 6 | | |"]
2953 #[doc = "| 7 | | Reserved (use NaN) |"]
2954 MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
2955 #[doc = "Enable or disable on-board camera triggering system."]
2956 #[doc = ""]
2957 #[doc = "# Parameters"]
2958 #[doc = ""]
2959 #[doc = "| Parameter | Description | Values |"]
2960 #[doc = "| --------- | ----------- | ------ |"]
2961 #[doc = "| 1 (Enable)| Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| -1, 0, 1 |"]
2962 #[doc = "| 2 (Reset) | 1 to reset the trigger sequence, -1 or 0 to ignore| -1, 0, 1 |"]
2963 #[doc = "| 3 (Pause) | 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| -1, 1 |"]
2964 #[doc = "| 4 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2965 MAV_CMD_DO_TRIGGER_CONTROL = 2003,
2966 #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
2967 #[doc = ""]
2968 #[doc = "# Parameters"]
2969 #[doc = ""]
2970 #[doc = "| Parameter | Description | Values |"]
2971 #[doc = "| --------- | ----------- | ------ |"]
2972 #[doc = "| 1 (Point x)| Point to track x value (normalized 0..1, 0 is left, 1 is right).| 0 .. 1 |"]
2973 #[doc = "| 2 (Point y)| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| 0 .. 1 |"]
2974 #[doc = "| 3 (Radius)| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| 0 .. 1 |"]
2975 #[doc = "| 4 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2976 MAV_CMD_CAMERA_TRACK_POINT = 2004,
2977 #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
2978 #[doc = ""]
2979 #[doc = "# Parameters"]
2980 #[doc = ""]
2981 #[doc = "| Parameter | Description | Values |"]
2982 #[doc = "| --------- | ----------- | ------ |"]
2983 #[doc = "| 1 (Top left corner x)| Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| 0 .. 1 |"]
2984 #[doc = "| 2 (Top left corner y)| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| 0 .. 1 |"]
2985 #[doc = "| 3 (Bottom right corner x)| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| 0 .. 1 |"]
2986 #[doc = "| 4 (Bottom right corner y)| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| 0 .. 1 |"]
2987 #[doc = "| 5 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2988 MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
2989 #[doc = "Stops ongoing tracking."]
2990 #[doc = ""]
2991 #[doc = "# Parameters"]
2992 #[doc = ""]
2993 #[doc = "| Parameter | Description | Values |"]
2994 #[doc = "| --------- | ----------- | ------ |"]
2995 #[doc = "| 1 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2996 MAV_CMD_CAMERA_STOP_TRACKING = 2010,
2997 #[doc = "Starts video capture (recording)."]
2998 #[doc = ""]
2999 #[doc = "# Parameters"]
3000 #[doc = ""]
3001 #[doc = "| Parameter | Description | Values | Units |"]
3002 #[doc = "| --------- | ----------- | ------ | ----- |"]
3003 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams)| 0, 1, .. | |"]
3004 #[doc = "| 2 (Status Frequency)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| ≥ 0 | Hz |"]
3005 #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 | |"]
3006 #[doc = "| 4 | | Reserved (use NaN) | |"]
3007 #[doc = "| 5 | | | |"]
3008 #[doc = "| 6 | | | |"]
3009 #[doc = "| 7 | | Reserved (use NaN) | |"]
3010 MAV_CMD_VIDEO_START_CAPTURE = 2500,
3011 #[doc = "Stop the current video capture (recording)."]
3012 #[doc = ""]
3013 #[doc = "# Parameters"]
3014 #[doc = ""]
3015 #[doc = "| Parameter | Description | Values |"]
3016 #[doc = "| --------- | ----------- | ------ |"]
3017 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams)| 0, 1, .. |"]
3018 #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
3019 #[doc = "| 3 | | Reserved (use NaN) |"]
3020 #[doc = "| 4 | | Reserved (use NaN) |"]
3021 #[doc = "| 5 | | |"]
3022 #[doc = "| 6 | | |"]
3023 #[doc = "| 7 | | Reserved (use NaN) |"]
3024 MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
3025 #[doc = "Start video streaming"]
3026 #[doc = ""]
3027 #[doc = "# Parameters"]
3028 #[doc = ""]
3029 #[doc = "| Parameter | Description | Values |"]
3030 #[doc = "| --------- | ----------- | ------ |"]
3031 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
3032 #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
3033 MAV_CMD_VIDEO_START_STREAMING = 2502,
3034 #[doc = "Stop the given video stream"]
3035 #[doc = ""]
3036 #[doc = "# Parameters"]
3037 #[doc = ""]
3038 #[doc = "| Parameter | Description | Values |"]
3039 #[doc = "| --------- | ----------- | ------ |"]
3040 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
3041 #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
3042 MAV_CMD_VIDEO_STOP_STREAMING = 2503,
3043 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2019-08)"]
3044 #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
3045 #[doc = ""]
3046 #[doc = "# Parameters"]
3047 #[doc = ""]
3048 #[doc = "| Parameter | Description | Values |"]
3049 #[doc = "| --------- | ----------- | ------ |"]
3050 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
3051 MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
3052 #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Superseded since 2019-08)"]
3053 #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
3054 #[doc = ""]
3055 #[doc = "# Parameters"]
3056 #[doc = ""]
3057 #[doc = "| Parameter | Description | Values |"]
3058 #[doc = "| --------- | ----------- | ------ |"]
3059 #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
3060 MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
3061 #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
3062 #[doc = ""]
3063 #[doc = "# Parameters"]
3064 #[doc = ""]
3065 #[doc = "| Parameter | Description | Values |"]
3066 #[doc = "| --------- | ----------- | ------ |"]
3067 #[doc = "| 1 (Format)| Format: 0: ULog| 0, 1, .. |"]
3068 #[doc = "| 2 | Reserved (set to 0)| |"]
3069 #[doc = "| 3 | Reserved (set to 0)| |"]
3070 #[doc = "| 4 | Reserved (set to 0)| |"]
3071 #[doc = "| 5 | Reserved (set to 0)| |"]
3072 #[doc = "| 6 | Reserved (set to 0)| |"]
3073 #[doc = "| 7 | Reserved (set to 0)| |"]
3074 MAV_CMD_LOGGING_START = 2510,
3075 #[doc = "Request to stop streaming log data over MAVLink"]
3076 #[doc = ""]
3077 #[doc = "# Parameters"]
3078 #[doc = ""]
3079 #[doc = "| Parameter | Description |"]
3080 #[doc = "| --------- | ----------- |"]
3081 #[doc = "| 1 | Reserved (set to 0)|"]
3082 #[doc = "| 2 | Reserved (set to 0)|"]
3083 #[doc = "| 3 | Reserved (set to 0)|"]
3084 #[doc = "| 4 | Reserved (set to 0)|"]
3085 #[doc = "| 5 | Reserved (set to 0)|"]
3086 #[doc = "| 6 | Reserved (set to 0)|"]
3087 #[doc = "| 7 | Reserved (set to 0)|"]
3088 MAV_CMD_LOGGING_STOP = 2511,
3089 #[doc = ""]
3090 #[doc = "# Parameters"]
3091 #[doc = ""]
3092 #[doc = "| Parameter | Description | Values |"]
3093 #[doc = "| --------- | ----------- | ------ |"]
3094 #[doc = "| 1 (Landing Gear ID)| Landing gear ID (default: 0, -1 for all)| -1, 0, .. |"]
3095 #[doc = "| 2 (Landing Gear Position)| Landing gear position (Down: 0, Up: 1, NaN for no change)| |"]
3096 #[doc = "| 3 | | Reserved (use NaN) |"]
3097 #[doc = "| 4 | | Reserved (use NaN) |"]
3098 #[doc = "| 5 | | |"]
3099 #[doc = "| 6 | | |"]
3100 #[doc = "| 7 | | Reserved (use NaN) |"]
3101 MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
3102 #[doc = "Request to start/stop transmitting over the high latency telemetry"]
3103 #[doc = ""]
3104 #[doc = "# Parameters"]
3105 #[doc = ""]
3106 #[doc = "| Parameter | Description | Values |"]
3107 #[doc = "| --------- | ----------- | ------ |"]
3108 #[doc = "| 1 (Enable)| Start transmission over high latency telemetry (MAV_BOOL_FALSE: stop transmission). Values not equal to 0 or 1 are invalid.| [`MavBool`] |"]
3109 #[doc = "| 2 | Empty | |"]
3110 #[doc = "| 3 | Empty | |"]
3111 #[doc = "| 4 | Empty | |"]
3112 #[doc = "| 5 | Empty | |"]
3113 #[doc = "| 6 | Empty | |"]
3114 #[doc = "| 7 | Empty | |"]
3115 MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
3116 #[doc = "Create a panorama at the current position"]
3117 #[doc = ""]
3118 #[doc = "# Parameters"]
3119 #[doc = ""]
3120 #[doc = "| Parameter | Description | Units |"]
3121 #[doc = "| --------- | ----------- | ----- |"]
3122 #[doc = "| 1 (Horizontal Angle)| Viewing angle horizontal of the panorama (+- 0.5 the total angle)| deg |"]
3123 #[doc = "| 2 (Vertical Angle)| Viewing angle vertical of panorama.| deg |"]
3124 #[doc = "| 3 (Horizontal Speed)| Speed of the horizontal rotation.| deg/s |"]
3125 #[doc = "| 4 (Vertical Speed)| Speed of the vertical rotation.| deg/s |"]
3126 MAV_CMD_PANORAMA_CREATE = 2800,
3127 #[doc = "Request VTOL transition"]
3128 #[doc = ""]
3129 #[doc = "# Parameters"]
3130 #[doc = ""]
3131 #[doc = "| Parameter | Description | Values |"]
3132 #[doc = "| --------- | ----------- | ------ |"]
3133 #[doc = "| 1 (State) | The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| [`MavVtolState`] |"]
3134 #[doc = "| 2 (Immediate)| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency \"Quadchute\". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.| |"]
3135 MAV_CMD_DO_VTOL_TRANSITION = 3000,
3136 #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
3137 #[doc = ""]
3138 #[doc = "# Parameters"]
3139 #[doc = ""]
3140 #[doc = "| Parameter | Description | Values |"]
3141 #[doc = "| --------- | ----------- | ------ |"]
3142 #[doc = "| 1 (System ID)| Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| 0, 1, .. , 255 |"]
3143 MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
3144 #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
3145 MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
3146 #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
3147 #[doc = ""]
3148 #[doc = "# Parameters"]
3149 #[doc = ""]
3150 #[doc = "| Parameter | Description | Units |"]
3151 #[doc = "| --------- | ----------- | ----- |"]
3152 #[doc = "| 1 (Radius)| Radius of desired circle in CIRCLE_MODE| m |"]
3153 #[doc = "| 2 | User defined| |"]
3154 #[doc = "| 3 | User defined| |"]
3155 #[doc = "| 4 | User defined| |"]
3156 #[doc = "| 5 (Latitude)| Target latitude of center of circle in CIRCLE_MODE| degE7 |"]
3157 #[doc = "| 6 (Longitude)| Target longitude of center of circle in CIRCLE_MODE| degE7 |"]
3158 MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
3159 #[doc = "Delay mission state machine until gate has been reached."]
3160 #[doc = ""]
3161 #[doc = "# Parameters"]
3162 #[doc = ""]
3163 #[doc = "| Parameter | Description | Values | Units |"]
3164 #[doc = "| --------- | ----------- | ------ | ----- |"]
3165 #[doc = "| 1 (Geometry)| Geometry: 0: orthogonal to path between previous and next waypoint.| 0, 1, .. | |"]
3166 #[doc = "| 2 (UseAltitude)| Use altitude (MAV_BOOL_FALSE: ignore altitude). Values not equal to 0 or 1 are invalid.| [`MavBool`] | |"]
3167 #[doc = "| 3 | Empty | | |"]
3168 #[doc = "| 4 | Empty | | |"]
3169 #[doc = "| 5 (Latitude)| Latitude | | |"]
3170 #[doc = "| 6 (Longitude)| Longitude | | |"]
3171 #[doc = "| 7 (Altitude)| Altitude | | m |"]
3172 MAV_CMD_CONDITION_GATE = 4501,
3173 #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
3174 #[doc = ""]
3175 #[doc = "# Parameters"]
3176 #[doc = ""]
3177 #[doc = "| Parameter | Description | Units |"]
3178 #[doc = "| --------- | ----------- | ----- |"]
3179 #[doc = "| 1 | Reserved | |"]
3180 #[doc = "| 2 | Reserved | |"]
3181 #[doc = "| 3 | Reserved | |"]
3182 #[doc = "| 4 | Reserved | |"]
3183 #[doc = "| 5 (Latitude)| Latitude | |"]
3184 #[doc = "| 6 (Longitude)| Longitude | |"]
3185 #[doc = "| 7 (Altitude)| Altitude | m |"]
3186 MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
3187 #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required. The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
3188 #[doc = ""]
3189 #[doc = "# Parameters"]
3190 #[doc = ""]
3191 #[doc = "| Parameter | Description | Values |"]
3192 #[doc = "| --------- | ----------- | ------ |"]
3193 #[doc = "| 1 (Vertex Count)| Polygon vertex count. This is the number of vertices in the current polygon (all vertices will have the same number).| 3, 4, .. |"]
3194 #[doc = "| 2 (Inclusion Group)| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| 0, 1, .. |"]
3195 #[doc = "| 3 | Reserved | |"]
3196 #[doc = "| 4 | Reserved | |"]
3197 #[doc = "| 5 (Latitude)| Latitude | |"]
3198 #[doc = "| 6 (Longitude)| Longitude | |"]
3199 #[doc = "| 7 | Reserved | |"]
3200 MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
3201 #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required. The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
3202 #[doc = ""]
3203 #[doc = "# Parameters"]
3204 #[doc = ""]
3205 #[doc = "| Parameter | Description | Values |"]
3206 #[doc = "| --------- | ----------- | ------ |"]
3207 #[doc = "| 1 (Vertex Count)| Polygon vertex count. This is the number of vertices in the current polygon (all vertices will have the same number).| 3, 4, .. |"]
3208 #[doc = "| 2 | Reserved | |"]
3209 #[doc = "| 3 | Reserved | |"]
3210 #[doc = "| 4 | Reserved | |"]
3211 #[doc = "| 5 (Latitude)| Latitude | |"]
3212 #[doc = "| 6 (Longitude)| Longitude | |"]
3213 #[doc = "| 7 | Reserved | |"]
3214 MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
3215 #[doc = "Circular fence area. The vehicle must stay inside this area."]
3216 #[doc = ""]
3217 #[doc = "# Parameters"]
3218 #[doc = ""]
3219 #[doc = "| Parameter | Description | Values | Units |"]
3220 #[doc = "| --------- | ----------- | ------ | ----- |"]
3221 #[doc = "| 1 (Radius)| Radius. | | m |"]
3222 #[doc = "| 2 (Inclusion Group)| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group| 0, 1, .. | |"]
3223 #[doc = "| 3 | Reserved | | |"]
3224 #[doc = "| 4 | Reserved | | |"]
3225 #[doc = "| 5 (Latitude)| Latitude | | |"]
3226 #[doc = "| 6 (Longitude)| Longitude | | |"]
3227 #[doc = "| 7 | Reserved | | |"]
3228 MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
3229 #[doc = "Circular fence area. The vehicle must stay outside this area."]
3230 #[doc = ""]
3231 #[doc = "# Parameters"]
3232 #[doc = ""]
3233 #[doc = "| Parameter | Description | Units |"]
3234 #[doc = "| --------- | ----------- | ----- |"]
3235 #[doc = "| 1 (Radius)| Radius. | m |"]
3236 #[doc = "| 2 | Reserved | |"]
3237 #[doc = "| 3 | Reserved | |"]
3238 #[doc = "| 4 | Reserved | |"]
3239 #[doc = "| 5 (Latitude)| Latitude | |"]
3240 #[doc = "| 6 (Longitude)| Longitude | |"]
3241 #[doc = "| 7 | Reserved | |"]
3242 MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
3243 #[doc = "Rally point. You can have multiple rally points defined."]
3244 #[doc = ""]
3245 #[doc = "# Parameters"]
3246 #[doc = ""]
3247 #[doc = "| Parameter | Description | Units |"]
3248 #[doc = "| --------- | ----------- | ----- |"]
3249 #[doc = "| 1 | Reserved | |"]
3250 #[doc = "| 2 | Reserved | |"]
3251 #[doc = "| 3 | Reserved | |"]
3252 #[doc = "| 4 | Reserved | |"]
3253 #[doc = "| 5 (Latitude)| Latitude | |"]
3254 #[doc = "| 6 (Longitude)| Longitude | |"]
3255 #[doc = "| 7 (Altitude)| Altitude | m |"]
3256 MAV_CMD_NAV_RALLY_POINT = 5100,
3257 #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
3258 #[doc = ""]
3259 #[doc = "# Parameters"]
3260 #[doc = ""]
3261 #[doc = "| Parameter | Description |"]
3262 #[doc = "| --------- | ----------- |"]
3263 #[doc = "| 1 | Reserved (set to 0)|"]
3264 #[doc = "| 2 | Reserved (set to 0)|"]
3265 #[doc = "| 3 | Reserved (set to 0)|"]
3266 #[doc = "| 4 | Reserved (set to 0)|"]
3267 #[doc = "| 5 | Reserved (set to 0)|"]
3268 #[doc = "| 6 | Reserved (set to 0)|"]
3269 #[doc = "| 7 | Reserved (set to 0)|"]
3270 MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
3271 #[doc = "Change state of safety switch."]
3272 #[doc = ""]
3273 #[doc = "# Parameters"]
3274 #[doc = ""]
3275 #[doc = "| Parameter | Description | Values |"]
3276 #[doc = "| --------- | ----------- | ------ |"]
3277 #[doc = "| 1 (Desired State)| New safety switch state.| [`SafetySwitchState`] |"]
3278 #[doc = "| 2 | Empty. | |"]
3279 #[doc = "| 3 | Empty. | |"]
3280 #[doc = "| 4 | Empty | |"]
3281 #[doc = "| 5 | Empty. | |"]
3282 #[doc = "| 6 | Empty. | |"]
3283 #[doc = "| 7 | Empty. | |"]
3284 MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
3285 #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
3286 #[doc = ""]
3287 #[doc = "# Parameters"]
3288 #[doc = ""]
3289 #[doc = "| Parameter | Description |"]
3290 #[doc = "| --------- | ----------- |"]
3291 #[doc = "| 1 | Reserved (set to 0)|"]
3292 #[doc = "| 2 | Reserved (set to 0)|"]
3293 #[doc = "| 3 | Reserved (set to 0)|"]
3294 #[doc = "| 4 | Reserved (set to 0)|"]
3295 #[doc = "| 5 | Reserved (set to 0)|"]
3296 #[doc = "| 6 | Reserved (set to 0)|"]
3297 #[doc = "| 7 | Reserved (set to 0)|"]
3298 MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
3299 #[deprecated = " See `` (Superseded since 2021-06)"]
3300 #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
3301 #[doc = ""]
3302 #[doc = "# Parameters"]
3303 #[doc = ""]
3304 #[doc = "| Parameter | Description | Values | Units |"]
3305 #[doc = "| --------- | ----------- | ------ | ----- |"]
3306 #[doc = "| 1 (Operation Mode)| Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| 0, 1, 2 | |"]
3307 #[doc = "| 2 (Approach Vector)| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| -1 .. 360 | deg |"]
3308 #[doc = "| 3 (Ground Speed)| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| ≥ -1 | |"]
3309 #[doc = "| 4 (Altitude Clearance)| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| ≥ -1 | m |"]
3310 #[doc = "| 5 (Latitude)| Latitude. | | degE7 |"]
3311 #[doc = "| 6 (Longitude)| Longitude. | | degE7 |"]
3312 #[doc = "| 7 (Altitude)| Altitude (MSL)| | m |"]
3313 MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
3314 #[deprecated = " See `` (Superseded since 2021-06)"]
3315 #[doc = "Control the payload deployment."]
3316 #[doc = ""]
3317 #[doc = "# Parameters"]
3318 #[doc = ""]
3319 #[doc = "| Parameter | Description | Values |"]
3320 #[doc = "| --------- | ----------- | ------ |"]
3321 #[doc = "| 1 (Operation Mode)| Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| 0, 1, .. , 101 |"]
3322 #[doc = "| 2 | Reserved | |"]
3323 #[doc = "| 3 | Reserved | |"]
3324 #[doc = "| 4 | Reserved | |"]
3325 #[doc = "| 5 | Reserved | |"]
3326 #[doc = "| 6 | Reserved | |"]
3327 #[doc = "| 7 | Reserved | |"]
3328 MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
3329 #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
3330 #[doc = ""]
3331 #[doc = "# Parameters"]
3332 #[doc = ""]
3333 #[doc = "| Parameter | Description | Units |"]
3334 #[doc = "| --------- | ----------- | ----- |"]
3335 #[doc = "| 1 (Yaw) | Yaw of vehicle in earth frame.| deg |"]
3336 #[doc = "| 2 (CompassMask)| CompassMask, 0 for all.| |"]
3337 #[doc = "| 3 (Latitude)| Latitude. | deg |"]
3338 #[doc = "| 4 (Longitude)| Longitude. | deg |"]
3339 #[doc = "| 5 | Empty. | |"]
3340 #[doc = "| 6 | Empty. | |"]
3341 #[doc = "| 7 | Empty. | |"]
3342 MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
3343 #[doc = "Command to operate winch."]
3344 #[doc = ""]
3345 #[doc = "# Parameters"]
3346 #[doc = ""]
3347 #[doc = "| Parameter | Description | Values | Units |"]
3348 #[doc = "| --------- | ----------- | ------ | ----- |"]
3349 #[doc = "| 1 (Instance)| Winch instance number.| 1, 2, .. | |"]
3350 #[doc = "| 2 (Action)| Action to perform.| [`WinchActions`] | |"]
3351 #[doc = "| 3 (Length)| Length of line to release (negative to wind).| | m |"]
3352 #[doc = "| 4 (Rate) | Release rate (negative to wind).| | m/s |"]
3353 #[doc = "| 5 | Empty. | | |"]
3354 #[doc = "| 6 | Empty. | | |"]
3355 #[doc = "| 7 | Empty. | | |"]
3356 MAV_CMD_DO_WINCH = 42600,
3357 #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
3358 #[doc = ""]
3359 #[doc = "# Parameters"]
3360 #[doc = ""]
3361 #[doc = "| Parameter | Description | Units |"]
3362 #[doc = "| --------- | ----------- | ----- |"]
3363 #[doc = "| 1 (transmission_time)| Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| s |"]
3364 #[doc = "| 2 (processing_time)| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| s |"]
3365 #[doc = "| 3 (accuracy)| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.| |"]
3366 #[doc = "| 4 | Empty | |"]
3367 #[doc = "| 5 (Latitude)| Latitude | |"]
3368 #[doc = "| 6 (Longitude)| Longitude | |"]
3369 #[doc = "| 7 (Altitude)| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| m |"]
3370 MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
3371 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3372 #[doc = ""]
3373 #[doc = "# Parameters"]
3374 #[doc = ""]
3375 #[doc = "| Parameter | Description | Units |"]
3376 #[doc = "| --------- | ----------- | ----- |"]
3377 #[doc = "| 1 | User defined| |"]
3378 #[doc = "| 2 | User defined| |"]
3379 #[doc = "| 3 | User defined| |"]
3380 #[doc = "| 4 | User defined| |"]
3381 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3382 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3383 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3384 MAV_CMD_WAYPOINT_USER_1 = 31000,
3385 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3386 #[doc = ""]
3387 #[doc = "# Parameters"]
3388 #[doc = ""]
3389 #[doc = "| Parameter | Description | Units |"]
3390 #[doc = "| --------- | ----------- | ----- |"]
3391 #[doc = "| 1 | User defined| |"]
3392 #[doc = "| 2 | User defined| |"]
3393 #[doc = "| 3 | User defined| |"]
3394 #[doc = "| 4 | User defined| |"]
3395 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3396 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3397 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3398 MAV_CMD_WAYPOINT_USER_2 = 31001,
3399 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3400 #[doc = ""]
3401 #[doc = "# Parameters"]
3402 #[doc = ""]
3403 #[doc = "| Parameter | Description | Units |"]
3404 #[doc = "| --------- | ----------- | ----- |"]
3405 #[doc = "| 1 | User defined| |"]
3406 #[doc = "| 2 | User defined| |"]
3407 #[doc = "| 3 | User defined| |"]
3408 #[doc = "| 4 | User defined| |"]
3409 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3410 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3411 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3412 MAV_CMD_WAYPOINT_USER_3 = 31002,
3413 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3414 #[doc = ""]
3415 #[doc = "# Parameters"]
3416 #[doc = ""]
3417 #[doc = "| Parameter | Description | Units |"]
3418 #[doc = "| --------- | ----------- | ----- |"]
3419 #[doc = "| 1 | User defined| |"]
3420 #[doc = "| 2 | User defined| |"]
3421 #[doc = "| 3 | User defined| |"]
3422 #[doc = "| 4 | User defined| |"]
3423 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3424 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3425 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3426 MAV_CMD_WAYPOINT_USER_4 = 31003,
3427 #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3428 #[doc = ""]
3429 #[doc = "# Parameters"]
3430 #[doc = ""]
3431 #[doc = "| Parameter | Description | Units |"]
3432 #[doc = "| --------- | ----------- | ----- |"]
3433 #[doc = "| 1 | User defined| |"]
3434 #[doc = "| 2 | User defined| |"]
3435 #[doc = "| 3 | User defined| |"]
3436 #[doc = "| 4 | User defined| |"]
3437 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3438 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3439 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3440 MAV_CMD_WAYPOINT_USER_5 = 31004,
3441 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3442 #[doc = ""]
3443 #[doc = "# Parameters"]
3444 #[doc = ""]
3445 #[doc = "| Parameter | Description | Units |"]
3446 #[doc = "| --------- | ----------- | ----- |"]
3447 #[doc = "| 1 | User defined| |"]
3448 #[doc = "| 2 | User defined| |"]
3449 #[doc = "| 3 | User defined| |"]
3450 #[doc = "| 4 | User defined| |"]
3451 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3452 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3453 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3454 MAV_CMD_SPATIAL_USER_1 = 31005,
3455 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3456 #[doc = ""]
3457 #[doc = "# Parameters"]
3458 #[doc = ""]
3459 #[doc = "| Parameter | Description | Units |"]
3460 #[doc = "| --------- | ----------- | ----- |"]
3461 #[doc = "| 1 | User defined| |"]
3462 #[doc = "| 2 | User defined| |"]
3463 #[doc = "| 3 | User defined| |"]
3464 #[doc = "| 4 | User defined| |"]
3465 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3466 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3467 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3468 MAV_CMD_SPATIAL_USER_2 = 31006,
3469 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3470 #[doc = ""]
3471 #[doc = "# Parameters"]
3472 #[doc = ""]
3473 #[doc = "| Parameter | Description | Units |"]
3474 #[doc = "| --------- | ----------- | ----- |"]
3475 #[doc = "| 1 | User defined| |"]
3476 #[doc = "| 2 | User defined| |"]
3477 #[doc = "| 3 | User defined| |"]
3478 #[doc = "| 4 | User defined| |"]
3479 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3480 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3481 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3482 MAV_CMD_SPATIAL_USER_3 = 31007,
3483 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3484 #[doc = ""]
3485 #[doc = "# Parameters"]
3486 #[doc = ""]
3487 #[doc = "| Parameter | Description | Units |"]
3488 #[doc = "| --------- | ----------- | ----- |"]
3489 #[doc = "| 1 | User defined| |"]
3490 #[doc = "| 2 | User defined| |"]
3491 #[doc = "| 3 | User defined| |"]
3492 #[doc = "| 4 | User defined| |"]
3493 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3494 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3495 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3496 MAV_CMD_SPATIAL_USER_4 = 31008,
3497 #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3498 #[doc = ""]
3499 #[doc = "# Parameters"]
3500 #[doc = ""]
3501 #[doc = "| Parameter | Description | Units |"]
3502 #[doc = "| --------- | ----------- | ----- |"]
3503 #[doc = "| 1 | User defined| |"]
3504 #[doc = "| 2 | User defined| |"]
3505 #[doc = "| 3 | User defined| |"]
3506 #[doc = "| 4 | User defined| |"]
3507 #[doc = "| 5 (Latitude)| Latitude unscaled| |"]
3508 #[doc = "| 6 (Longitude)| Longitude unscaled| |"]
3509 #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3510 MAV_CMD_SPATIAL_USER_5 = 31009,
3511 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3512 #[doc = ""]
3513 #[doc = "# Parameters"]
3514 #[doc = ""]
3515 #[doc = "| Parameter | Description |"]
3516 #[doc = "| --------- | ----------- |"]
3517 #[doc = "| 1 | User defined|"]
3518 #[doc = "| 2 | User defined|"]
3519 #[doc = "| 3 | User defined|"]
3520 #[doc = "| 4 | User defined|"]
3521 #[doc = "| 5 | User defined|"]
3522 #[doc = "| 6 | User defined|"]
3523 #[doc = "| 7 | User defined|"]
3524 MAV_CMD_USER_1 = 31010,
3525 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3526 #[doc = ""]
3527 #[doc = "# Parameters"]
3528 #[doc = ""]
3529 #[doc = "| Parameter | Description |"]
3530 #[doc = "| --------- | ----------- |"]
3531 #[doc = "| 1 | User defined|"]
3532 #[doc = "| 2 | User defined|"]
3533 #[doc = "| 3 | User defined|"]
3534 #[doc = "| 4 | User defined|"]
3535 #[doc = "| 5 | User defined|"]
3536 #[doc = "| 6 | User defined|"]
3537 #[doc = "| 7 | User defined|"]
3538 MAV_CMD_USER_2 = 31011,
3539 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3540 #[doc = ""]
3541 #[doc = "# Parameters"]
3542 #[doc = ""]
3543 #[doc = "| Parameter | Description |"]
3544 #[doc = "| --------- | ----------- |"]
3545 #[doc = "| 1 | User defined|"]
3546 #[doc = "| 2 | User defined|"]
3547 #[doc = "| 3 | User defined|"]
3548 #[doc = "| 4 | User defined|"]
3549 #[doc = "| 5 | User defined|"]
3550 #[doc = "| 6 | User defined|"]
3551 #[doc = "| 7 | User defined|"]
3552 MAV_CMD_USER_3 = 31012,
3553 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3554 #[doc = ""]
3555 #[doc = "# Parameters"]
3556 #[doc = ""]
3557 #[doc = "| Parameter | Description |"]
3558 #[doc = "| --------- | ----------- |"]
3559 #[doc = "| 1 | User defined|"]
3560 #[doc = "| 2 | User defined|"]
3561 #[doc = "| 3 | User defined|"]
3562 #[doc = "| 4 | User defined|"]
3563 #[doc = "| 5 | User defined|"]
3564 #[doc = "| 6 | User defined|"]
3565 #[doc = "| 7 | User defined|"]
3566 MAV_CMD_USER_4 = 31013,
3567 #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3568 #[doc = ""]
3569 #[doc = "# Parameters"]
3570 #[doc = ""]
3571 #[doc = "| Parameter | Description |"]
3572 #[doc = "| --------- | ----------- |"]
3573 #[doc = "| 1 | User defined|"]
3574 #[doc = "| 2 | User defined|"]
3575 #[doc = "| 3 | User defined|"]
3576 #[doc = "| 4 | User defined|"]
3577 #[doc = "| 5 | User defined|"]
3578 #[doc = "| 6 | User defined|"]
3579 #[doc = "| 7 | User defined|"]
3580 MAV_CMD_USER_5 = 31014,
3581 #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
3582 #[doc = ""]
3583 #[doc = "# Parameters"]
3584 #[doc = ""]
3585 #[doc = "| Parameter | Description |"]
3586 #[doc = "| --------- | ----------- |"]
3587 #[doc = "| 1 (bus) | Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).|"]
3588 #[doc = "| 2 | Empty. |"]
3589 #[doc = "| 3 | Empty. |"]
3590 #[doc = "| 4 | Empty. |"]
3591 #[doc = "| 5 | Empty. |"]
3592 #[doc = "| 6 | Empty. |"]
3593 #[doc = "| 7 | Empty. |"]
3594 MAV_CMD_CAN_FORWARD = 32000,
3595}
3596impl MavCmd {
3597 pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
3598}
3599impl Default for MavCmd {
3600 fn default() -> Self {
3601 Self::DEFAULT
3602 }
3603}
3604#[cfg_attr(feature = "ts", derive(TS))]
3605#[cfg_attr(feature = "ts", ts(export))]
3606#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3608#[cfg_attr(feature = "serde", serde(tag = "type"))]
3609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3610#[repr(u32)]
3611#[doc = "Possible actions an aircraft can take to avoid a collision."]
3612pub enum MavCollisionAction {
3613 #[doc = "Ignore any potential collisions"]
3614 MAV_COLLISION_ACTION_NONE = 0,
3615 #[doc = "Report potential collision"]
3616 MAV_COLLISION_ACTION_REPORT = 1,
3617 #[doc = "Ascend or Descend to avoid threat"]
3618 MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
3619 #[doc = "Move horizontally to avoid threat"]
3620 MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
3621 #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
3622 MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
3623 #[doc = "Aircraft to fly directly back to its launch point"]
3624 MAV_COLLISION_ACTION_RTL = 5,
3625 #[doc = "Aircraft to stop in place"]
3626 MAV_COLLISION_ACTION_HOVER = 6,
3627}
3628impl MavCollisionAction {
3629 pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
3630}
3631impl Default for MavCollisionAction {
3632 fn default() -> Self {
3633 Self::DEFAULT
3634 }
3635}
3636#[cfg_attr(feature = "ts", derive(TS))]
3637#[cfg_attr(feature = "ts", ts(export))]
3638#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3640#[cfg_attr(feature = "serde", serde(tag = "type"))]
3641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3642#[repr(u32)]
3643#[doc = "Source of information about this collision."]
3644pub enum MavCollisionSrc {
3645 #[doc = "ID field references ADSB_VEHICLE packets"]
3646 MAV_COLLISION_SRC_ADSB = 0,
3647 #[doc = "ID field references MAVLink SRC ID"]
3648 MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
3649}
3650impl MavCollisionSrc {
3651 pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
3652}
3653impl Default for MavCollisionSrc {
3654 fn default() -> Self {
3655 Self::DEFAULT
3656 }
3657}
3658#[cfg_attr(feature = "ts", derive(TS))]
3659#[cfg_attr(feature = "ts", ts(export))]
3660#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3662#[cfg_attr(feature = "serde", serde(tag = "type"))]
3663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3664#[repr(u32)]
3665#[doc = "Aircraft-rated danger from this threat."]
3666pub enum MavCollisionThreatLevel {
3667 #[doc = "Not a threat"]
3668 MAV_COLLISION_THREAT_LEVEL_NONE = 0,
3669 #[doc = "Craft is mildly concerned about this threat"]
3670 MAV_COLLISION_THREAT_LEVEL_LOW = 1,
3671 #[doc = "Craft is panicking, and may take actions to avoid threat"]
3672 MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
3673}
3674impl MavCollisionThreatLevel {
3675 pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
3676}
3677impl Default for MavCollisionThreatLevel {
3678 fn default() -> Self {
3679 Self::DEFAULT
3680 }
3681}
3682#[cfg_attr(feature = "ts", derive(TS))]
3683#[cfg_attr(feature = "ts", ts(export))]
3684#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3686#[cfg_attr(feature = "serde", serde(tag = "type"))]
3687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3688#[repr(u32)]
3689#[doc = "Legacy component ID values for particular types of hardware/software that might make up a MAVLink system (autopilot, cameras, servos, avoidance systems etc.). Components are not required or expected to use IDs with names that correspond to their type or function, but may choose to do so. Using an ID that matches the type may slightly reduce the chances of component id clashes, as, for historical reasons, it is less likely to be used by some other type of component. System integration will still need to ensure that all components have unique IDs. Component IDs are used for addressing messages to a particular component within a system. A component can use any unique ID between 1 and 255 (MAV_COMP_ID_ALL value is the broadcast address, used to send to all components). Historically component ID were also used for identifying the type of component. New code must not use component IDs to infer the component type, but instead check the MAV_TYPE in the HEARTBEAT message!"]
3690pub enum MavComponent {
3691 #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
3692 MAV_COMP_ID_ALL = 0,
3693 #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
3694 MAV_COMP_ID_AUTOPILOT1 = 1,
3695 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3696 MAV_COMP_ID_USER1 = 25,
3697 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3698 MAV_COMP_ID_USER2 = 26,
3699 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3700 MAV_COMP_ID_USER3 = 27,
3701 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3702 MAV_COMP_ID_USER4 = 28,
3703 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3704 MAV_COMP_ID_USER5 = 29,
3705 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3706 MAV_COMP_ID_USER6 = 30,
3707 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3708 MAV_COMP_ID_USER7 = 31,
3709 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3710 MAV_COMP_ID_USER8 = 32,
3711 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3712 MAV_COMP_ID_USER9 = 33,
3713 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3714 MAV_COMP_ID_USER10 = 34,
3715 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3716 MAV_COMP_ID_USER11 = 35,
3717 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3718 MAV_COMP_ID_USER12 = 36,
3719 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3720 MAV_COMP_ID_USER13 = 37,
3721 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3722 MAV_COMP_ID_USER14 = 38,
3723 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3724 MAV_COMP_ID_USER15 = 39,
3725 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3726 MAV_COMP_ID_USER16 = 40,
3727 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3728 MAV_COMP_ID_USER17 = 41,
3729 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3730 MAV_COMP_ID_USER18 = 42,
3731 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3732 MAV_COMP_ID_USER19 = 43,
3733 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3734 MAV_COMP_ID_USER20 = 44,
3735 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3736 MAV_COMP_ID_USER21 = 45,
3737 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3738 MAV_COMP_ID_USER22 = 46,
3739 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3740 MAV_COMP_ID_USER23 = 47,
3741 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3742 MAV_COMP_ID_USER24 = 48,
3743 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3744 MAV_COMP_ID_USER25 = 49,
3745 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3746 MAV_COMP_ID_USER26 = 50,
3747 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3748 MAV_COMP_ID_USER27 = 51,
3749 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3750 MAV_COMP_ID_USER28 = 52,
3751 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3752 MAV_COMP_ID_USER29 = 53,
3753 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3754 MAV_COMP_ID_USER30 = 54,
3755 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3756 MAV_COMP_ID_USER31 = 55,
3757 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3758 MAV_COMP_ID_USER32 = 56,
3759 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3760 MAV_COMP_ID_USER33 = 57,
3761 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3762 MAV_COMP_ID_USER34 = 58,
3763 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3764 MAV_COMP_ID_USER35 = 59,
3765 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3766 MAV_COMP_ID_USER36 = 60,
3767 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3768 MAV_COMP_ID_USER37 = 61,
3769 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3770 MAV_COMP_ID_USER38 = 62,
3771 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3772 MAV_COMP_ID_USER39 = 63,
3773 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3774 MAV_COMP_ID_USER40 = 64,
3775 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3776 MAV_COMP_ID_USER41 = 65,
3777 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3778 MAV_COMP_ID_USER42 = 66,
3779 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3780 MAV_COMP_ID_USER43 = 67,
3781 #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
3782 MAV_COMP_ID_TELEMETRY_RADIO = 68,
3783 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3784 MAV_COMP_ID_USER45 = 69,
3785 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3786 MAV_COMP_ID_USER46 = 70,
3787 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3788 MAV_COMP_ID_USER47 = 71,
3789 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3790 MAV_COMP_ID_USER48 = 72,
3791 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3792 MAV_COMP_ID_USER49 = 73,
3793 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3794 MAV_COMP_ID_USER50 = 74,
3795 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3796 MAV_COMP_ID_USER51 = 75,
3797 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3798 MAV_COMP_ID_USER52 = 76,
3799 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3800 MAV_COMP_ID_USER53 = 77,
3801 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3802 MAV_COMP_ID_USER54 = 78,
3803 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3804 MAV_COMP_ID_USER55 = 79,
3805 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3806 MAV_COMP_ID_USER56 = 80,
3807 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3808 MAV_COMP_ID_USER57 = 81,
3809 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3810 MAV_COMP_ID_USER58 = 82,
3811 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3812 MAV_COMP_ID_USER59 = 83,
3813 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3814 MAV_COMP_ID_USER60 = 84,
3815 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3816 MAV_COMP_ID_USER61 = 85,
3817 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3818 MAV_COMP_ID_USER62 = 86,
3819 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3820 MAV_COMP_ID_USER63 = 87,
3821 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3822 MAV_COMP_ID_USER64 = 88,
3823 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3824 MAV_COMP_ID_USER65 = 89,
3825 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3826 MAV_COMP_ID_USER66 = 90,
3827 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3828 MAV_COMP_ID_USER67 = 91,
3829 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3830 MAV_COMP_ID_USER68 = 92,
3831 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3832 MAV_COMP_ID_USER69 = 93,
3833 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3834 MAV_COMP_ID_USER70 = 94,
3835 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3836 MAV_COMP_ID_USER71 = 95,
3837 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3838 MAV_COMP_ID_USER72 = 96,
3839 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3840 MAV_COMP_ID_USER73 = 97,
3841 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3842 MAV_COMP_ID_USER74 = 98,
3843 #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3844 MAV_COMP_ID_USER75 = 99,
3845 #[doc = "Camera #1."]
3846 MAV_COMP_ID_CAMERA = 100,
3847 #[doc = "Camera #2."]
3848 MAV_COMP_ID_CAMERA2 = 101,
3849 #[doc = "Camera #3."]
3850 MAV_COMP_ID_CAMERA3 = 102,
3851 #[doc = "Camera #4."]
3852 MAV_COMP_ID_CAMERA4 = 103,
3853 #[doc = "Camera #5."]
3854 MAV_COMP_ID_CAMERA5 = 104,
3855 #[doc = "Camera #6."]
3856 MAV_COMP_ID_CAMERA6 = 105,
3857 #[doc = "Radio #1."]
3858 MAV_COMP_ID_RADIO = 110,
3859 #[doc = "Radio #2."]
3860 MAV_COMP_ID_RADIO2 = 111,
3861 #[doc = "Radio #3."]
3862 MAV_COMP_ID_RADIO3 = 112,
3863 #[doc = "Servo #1."]
3864 MAV_COMP_ID_SERVO1 = 140,
3865 #[doc = "Servo #2."]
3866 MAV_COMP_ID_SERVO2 = 141,
3867 #[doc = "Servo #3."]
3868 MAV_COMP_ID_SERVO3 = 142,
3869 #[doc = "Servo #4."]
3870 MAV_COMP_ID_SERVO4 = 143,
3871 #[doc = "Servo #5."]
3872 MAV_COMP_ID_SERVO5 = 144,
3873 #[doc = "Servo #6."]
3874 MAV_COMP_ID_SERVO6 = 145,
3875 #[doc = "Servo #7."]
3876 MAV_COMP_ID_SERVO7 = 146,
3877 #[doc = "Servo #8."]
3878 MAV_COMP_ID_SERVO8 = 147,
3879 #[doc = "Servo #9."]
3880 MAV_COMP_ID_SERVO9 = 148,
3881 #[doc = "Servo #10."]
3882 MAV_COMP_ID_SERVO10 = 149,
3883 #[doc = "Servo #11."]
3884 MAV_COMP_ID_SERVO11 = 150,
3885 #[doc = "Servo #12."]
3886 MAV_COMP_ID_SERVO12 = 151,
3887 #[doc = "Servo #13."]
3888 MAV_COMP_ID_SERVO13 = 152,
3889 #[doc = "Servo #14."]
3890 MAV_COMP_ID_SERVO14 = 153,
3891 #[doc = "Gimbal #1."]
3892 MAV_COMP_ID_GIMBAL = 154,
3893 #[doc = "Logging component."]
3894 MAV_COMP_ID_LOG = 155,
3895 #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
3896 MAV_COMP_ID_ADSB = 156,
3897 #[doc = "On Screen Display (OSD) devices for video links."]
3898 MAV_COMP_ID_OSD = 157,
3899 #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
3900 MAV_COMP_ID_PERIPHERAL = 158,
3901 #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
3902 #[doc = "Gimbal ID for QX1."]
3903 MAV_COMP_ID_QX1_GIMBAL = 159,
3904 #[doc = "FLARM collision alert component."]
3905 MAV_COMP_ID_FLARM = 160,
3906 #[doc = "Parachute component."]
3907 MAV_COMP_ID_PARACHUTE = 161,
3908 #[doc = "Winch component."]
3909 MAV_COMP_ID_WINCH = 169,
3910 #[doc = "Gimbal #2."]
3911 MAV_COMP_ID_GIMBAL2 = 171,
3912 #[doc = "Gimbal #3."]
3913 MAV_COMP_ID_GIMBAL3 = 172,
3914 #[doc = "Gimbal #4"]
3915 MAV_COMP_ID_GIMBAL4 = 173,
3916 #[doc = "Gimbal #5."]
3917 MAV_COMP_ID_GIMBAL5 = 174,
3918 #[doc = "Gimbal #6."]
3919 MAV_COMP_ID_GIMBAL6 = 175,
3920 #[doc = "Battery #1."]
3921 MAV_COMP_ID_BATTERY = 180,
3922 #[doc = "Battery #2."]
3923 MAV_COMP_ID_BATTERY2 = 181,
3924 #[doc = "CAN over MAVLink client."]
3925 MAV_COMP_ID_MAVCAN = 189,
3926 #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
3927 MAV_COMP_ID_MISSIONPLANNER = 190,
3928 #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3929 MAV_COMP_ID_ONBOARD_COMPUTER = 191,
3930 #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3931 MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
3932 #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3933 MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
3934 #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3935 MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
3936 #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
3937 MAV_COMP_ID_PATHPLANNER = 195,
3938 #[doc = "Component that plans a collision free path between two points."]
3939 MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
3940 #[doc = "Component that provides position estimates using VIO techniques."]
3941 MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
3942 #[doc = "Component that manages pairing of vehicle and GCS."]
3943 MAV_COMP_ID_PAIRING_MANAGER = 198,
3944 #[doc = "Inertial Measurement Unit (IMU) #1."]
3945 MAV_COMP_ID_IMU = 200,
3946 #[doc = "Inertial Measurement Unit (IMU) #2."]
3947 MAV_COMP_ID_IMU_2 = 201,
3948 #[doc = "Inertial Measurement Unit (IMU) #3."]
3949 MAV_COMP_ID_IMU_3 = 202,
3950 #[doc = "GPS #1."]
3951 MAV_COMP_ID_GPS = 220,
3952 #[doc = "GPS #2."]
3953 MAV_COMP_ID_GPS2 = 221,
3954 #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3955 MAV_COMP_ID_ODID_TXRX_1 = 236,
3956 #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3957 MAV_COMP_ID_ODID_TXRX_2 = 237,
3958 #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3959 MAV_COMP_ID_ODID_TXRX_3 = 238,
3960 #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
3961 MAV_COMP_ID_UDP_BRIDGE = 240,
3962 #[doc = "Component to bridge to UART (i.e. from UDP)."]
3963 MAV_COMP_ID_UART_BRIDGE = 241,
3964 #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
3965 MAV_COMP_ID_TUNNEL_NODE = 242,
3966 #[doc = "Illuminator"]
3967 MAV_COMP_ID_ILLUMINATOR = 243,
3968 #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
3969 #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
3970 MAV_COMP_ID_SYSTEM_CONTROL = 250,
3971}
3972impl MavComponent {
3973 pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
3974}
3975impl Default for MavComponent {
3976 fn default() -> Self {
3977 Self::DEFAULT
3978 }
3979}
3980#[cfg_attr(feature = "ts", derive(TS))]
3981#[cfg_attr(feature = "ts", ts(export))]
3982#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3984#[cfg_attr(feature = "serde", serde(tag = "type"))]
3985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3986#[repr(u32)]
3987#[deprecated = " See `MESSAGE_INTERVAL` (Superseded since 2015-06)"]
3988#[doc = "A data stream is not a fixed set of messages, but rather a recommendation to the autopilot software. Individual autopilots may or may not obey the recommended messages."]
3989pub enum MavDataStream {
3990 #[doc = "Enable all data streams"]
3991 MAV_DATA_STREAM_ALL = 0,
3992 #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
3993 MAV_DATA_STREAM_RAW_SENSORS = 1,
3994 #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
3995 MAV_DATA_STREAM_EXTENDED_STATUS = 2,
3996 #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
3997 MAV_DATA_STREAM_RC_CHANNELS = 3,
3998 #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
3999 MAV_DATA_STREAM_RAW_CONTROLLER = 4,
4000 #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
4001 MAV_DATA_STREAM_POSITION = 6,
4002 #[doc = "Dependent on the autopilot"]
4003 MAV_DATA_STREAM_EXTRA1 = 10,
4004 #[doc = "Dependent on the autopilot"]
4005 MAV_DATA_STREAM_EXTRA2 = 11,
4006 #[doc = "Dependent on the autopilot"]
4007 MAV_DATA_STREAM_EXTRA3 = 12,
4008}
4009impl MavDataStream {
4010 pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
4011}
4012impl Default for MavDataStream {
4013 fn default() -> Self {
4014 Self::DEFAULT
4015 }
4016}
4017#[cfg_attr(feature = "ts", derive(TS))]
4018#[cfg_attr(feature = "ts", ts(export))]
4019#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4021#[cfg_attr(feature = "serde", serde(tag = "type"))]
4022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4023#[repr(u32)]
4024#[doc = "Enumeration of distance sensor types"]
4025pub enum MavDistanceSensor {
4026 #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
4027 MAV_DISTANCE_SENSOR_LASER = 0,
4028 #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
4029 MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
4030 #[doc = "Infrared rangefinder, e.g. Sharp units"]
4031 MAV_DISTANCE_SENSOR_INFRARED = 2,
4032 #[doc = "Radar type, e.g. uLanding units"]
4033 MAV_DISTANCE_SENSOR_RADAR = 3,
4034 #[doc = "Broken or unknown type, e.g. analog units"]
4035 MAV_DISTANCE_SENSOR_UNKNOWN = 4,
4036}
4037impl MavDistanceSensor {
4038 pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
4039}
4040impl Default for MavDistanceSensor {
4041 fn default() -> Self {
4042 Self::DEFAULT
4043 }
4044}
4045#[cfg_attr(feature = "ts", derive(TS))]
4046#[cfg_attr(feature = "ts", ts(export))]
4047#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4048#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4049#[cfg_attr(feature = "serde", serde(tag = "type"))]
4050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4051#[repr(u32)]
4052#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
4053pub enum MavDoRepositionFlags {
4054 #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
4055 MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
4056 #[doc = "Yaw relative to the vehicle current heading (if not set, relative to North)."]
4057 MAV_DO_REPOSITION_FLAGS_RELATIVE_YAW = 2,
4058}
4059impl MavDoRepositionFlags {
4060 pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
4061}
4062impl Default for MavDoRepositionFlags {
4063 fn default() -> Self {
4064 Self::DEFAULT
4065 }
4066}
4067#[cfg_attr(feature = "ts", derive(TS))]
4068#[cfg_attr(feature = "ts", ts(export))]
4069#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4071#[cfg_attr(feature = "serde", serde(tag = "type"))]
4072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4073#[repr(u32)]
4074#[doc = "Enumeration of estimator types"]
4075pub enum MavEstimatorType {
4076 #[doc = "Unknown type of the estimator."]
4077 MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
4078 #[doc = "This is a naive estimator without any real covariance feedback."]
4079 MAV_ESTIMATOR_TYPE_NAIVE = 1,
4080 #[doc = "Computer vision based estimate. Might be up to scale."]
4081 MAV_ESTIMATOR_TYPE_VISION = 2,
4082 #[doc = "Visual-inertial estimate."]
4083 MAV_ESTIMATOR_TYPE_VIO = 3,
4084 #[doc = "Plain GPS estimate."]
4085 MAV_ESTIMATOR_TYPE_GPS = 4,
4086 #[doc = "Estimator integrating GPS and inertial sensing."]
4087 MAV_ESTIMATOR_TYPE_GPS_INS = 5,
4088 #[doc = "Estimate from external motion capturing system."]
4089 MAV_ESTIMATOR_TYPE_MOCAP = 6,
4090 #[doc = "Estimator based on lidar sensor input."]
4091 MAV_ESTIMATOR_TYPE_LIDAR = 7,
4092 #[doc = "Estimator on autopilot."]
4093 MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
4094}
4095impl MavEstimatorType {
4096 pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
4097}
4098impl Default for MavEstimatorType {
4099 fn default() -> Self {
4100 Self::DEFAULT
4101 }
4102}
4103bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for CURRENT_EVENT_SEQUENCE."] pub struct MavEventCurrentSequenceFlags : u8 { # [doc = "A sequence reset has happened (e.g. vehicle reboot)."] const MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1 ; } }
4104impl MavEventCurrentSequenceFlags {
4105 pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
4106}
4107impl Default for MavEventCurrentSequenceFlags {
4108 fn default() -> Self {
4109 Self::DEFAULT
4110 }
4111}
4112#[cfg_attr(feature = "ts", derive(TS))]
4113#[cfg_attr(feature = "ts", ts(export))]
4114#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4116#[cfg_attr(feature = "serde", serde(tag = "type"))]
4117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4118#[repr(u32)]
4119#[doc = "Reason for an event error response."]
4120pub enum MavEventErrorReason {
4121 #[doc = "The requested event is not available (anymore)."]
4122 MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
4123}
4124impl MavEventErrorReason {
4125 pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
4126}
4127impl Default for MavEventErrorReason {
4128 fn default() -> Self {
4129 Self::DEFAULT
4130 }
4131}
4132#[cfg_attr(feature = "ts", derive(TS))]
4133#[cfg_attr(feature = "ts", ts(export))]
4134#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4136#[cfg_attr(feature = "serde", serde(tag = "type"))]
4137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4138#[repr(u32)]
4139#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles. Global frames use the following naming conventions: - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default. The following modifiers may be used with \"GLOBAL\": - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL. - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL. - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7. Local frames use the following naming conventions: - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\"). - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude. - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames. Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
4140pub enum MavFrame {
4141 #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
4142 MAV_FRAME_GLOBAL = 0,
4143 #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
4144 MAV_FRAME_LOCAL_NED = 1,
4145 #[doc = "NOT a coordinate frame, indicates a mission command."]
4146 MAV_FRAME_MISSION = 2,
4147 #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
4148 MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
4149 #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
4150 MAV_FRAME_LOCAL_ENU = 4,
4151 #[deprecated = " See `MAV_FRAME_GLOBAL` (Superseded since 2024-03)"]
4152 #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
4153 MAV_FRAME_GLOBAL_INT = 5,
4154 #[deprecated = " See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Superseded since 2024-03)"]
4155 #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
4156 MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
4157 #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
4158 MAV_FRAME_LOCAL_OFFSET_NED = 7,
4159 #[deprecated = " See `MAV_FRAME_BODY_FRD` (Superseded since 2019-08)"]
4160 #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
4161 MAV_FRAME_BODY_NED = 8,
4162 #[deprecated = " See `MAV_FRAME_BODY_FRD` (Superseded since 2019-08)"]
4163 #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
4164 MAV_FRAME_BODY_OFFSET_NED = 9,
4165 #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
4166 MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
4167 #[deprecated = " See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Superseded since 2024-03)"]
4168 #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
4169 MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
4170 #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
4171 MAV_FRAME_BODY_FRD = 12,
4172 #[deprecated = " (Deprecated since 2019-04)"]
4173 #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
4174 MAV_FRAME_RESERVED_13 = 13,
4175 #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
4176 #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
4177 MAV_FRAME_RESERVED_14 = 14,
4178 #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
4179 #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
4180 MAV_FRAME_RESERVED_15 = 15,
4181 #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
4182 #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
4183 MAV_FRAME_RESERVED_16 = 16,
4184 #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
4185 #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
4186 MAV_FRAME_RESERVED_17 = 17,
4187 #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
4188 #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
4189 MAV_FRAME_RESERVED_18 = 18,
4190 #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
4191 #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
4192 MAV_FRAME_RESERVED_19 = 19,
4193 #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
4194 MAV_FRAME_LOCAL_FRD = 20,
4195 #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
4196 MAV_FRAME_LOCAL_FLU = 21,
4197}
4198impl MavFrame {
4199 pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
4200}
4201impl Default for MavFrame {
4202 fn default() -> Self {
4203 Self::DEFAULT
4204 }
4205}
4206#[cfg_attr(feature = "ts", derive(TS))]
4207#[cfg_attr(feature = "ts", ts(export))]
4208#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4210#[cfg_attr(feature = "serde", serde(tag = "type"))]
4211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4212#[repr(u32)]
4213#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
4214pub enum MavFtpErr {
4215 #[doc = "None: No error"]
4216 MAV_FTP_ERR_NONE = 0,
4217 #[doc = "Fail: Unknown failure"]
4218 MAV_FTP_ERR_FAIL = 1,
4219 #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
4220 MAV_FTP_ERR_FAILERRNO = 2,
4221 #[doc = "InvalidDataSize: Payload size is invalid"]
4222 MAV_FTP_ERR_INVALIDDATASIZE = 3,
4223 #[doc = "InvalidSession: Session is not currently open"]
4224 MAV_FTP_ERR_INVALIDSESSION = 4,
4225 #[doc = "NoSessionsAvailable: All available sessions are already in use"]
4226 MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
4227 #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
4228 MAV_FTP_ERR_EOF = 6,
4229 #[doc = "UnknownCommand: Unknown command / opcode"]
4230 MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
4231 #[doc = "FileExists: File/directory already exists"]
4232 MAV_FTP_ERR_FILEEXISTS = 8,
4233 #[doc = "FileProtected: File/directory is write protected"]
4234 MAV_FTP_ERR_FILEPROTECTED = 9,
4235 #[doc = "FileNotFound: File/directory not found"]
4236 MAV_FTP_ERR_FILENOTFOUND = 10,
4237}
4238impl MavFtpErr {
4239 pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
4240}
4241impl Default for MavFtpErr {
4242 fn default() -> Self {
4243 Self::DEFAULT
4244 }
4245}
4246#[cfg_attr(feature = "ts", derive(TS))]
4247#[cfg_attr(feature = "ts", ts(export))]
4248#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4250#[cfg_attr(feature = "serde", serde(tag = "type"))]
4251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4252#[repr(u32)]
4253#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
4254pub enum MavFtpOpcode {
4255 #[doc = "None. Ignored, always ACKed"]
4256 MAV_FTP_OPCODE_NONE = 0,
4257 #[doc = "TerminateSession: Terminates open Read session"]
4258 MAV_FTP_OPCODE_TERMINATESESSION = 1,
4259 #[doc = "ResetSessions: Terminates all open read sessions"]
4260 MAV_FTP_OPCODE_RESETSESSION = 2,
4261 #[doc = "ListDirectory. List files and directories in path from offset"]
4262 MAV_FTP_OPCODE_LISTDIRECTORY = 3,
4263 #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
4264 MAV_FTP_OPCODE_OPENFILERO = 4,
4265 #[doc = "ReadFile: Reads size bytes from offset in session"]
4266 MAV_FTP_OPCODE_READFILE = 5,
4267 #[doc = "CreateFile: Creates file at path for writing, returns session"]
4268 MAV_FTP_OPCODE_CREATEFILE = 6,
4269 #[doc = "WriteFile: Writes size bytes to offset in session"]
4270 MAV_FTP_OPCODE_WRITEFILE = 7,
4271 #[doc = "RemoveFile: Remove file at path"]
4272 MAV_FTP_OPCODE_REMOVEFILE = 8,
4273 #[doc = "CreateDirectory: Creates directory at path"]
4274 MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
4275 #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
4276 MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
4277 #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
4278 MAV_FTP_OPCODE_OPENFILEWO = 11,
4279 #[doc = "TruncateFile: Truncate file at path to offset length"]
4280 MAV_FTP_OPCODE_TRUNCATEFILE = 12,
4281 #[doc = "Rename: Rename path1 to path2"]
4282 MAV_FTP_OPCODE_RENAME = 13,
4283 #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
4284 MAV_FTP_OPCODE_CALCFILECRC = 14,
4285 #[doc = "BurstReadFile: Burst download session file"]
4286 MAV_FTP_OPCODE_BURSTREADFILE = 15,
4287 #[doc = "ACK: ACK response"]
4288 MAV_FTP_OPCODE_ACK = 128,
4289 #[doc = "NAK: NAK response"]
4290 MAV_FTP_OPCODE_NAK = 129,
4291}
4292impl MavFtpOpcode {
4293 pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
4294}
4295impl Default for MavFtpOpcode {
4296 fn default() -> Self {
4297 Self::DEFAULT
4298 }
4299}
4300#[cfg_attr(feature = "ts", derive(TS))]
4301#[cfg_attr(feature = "ts", ts(export))]
4302#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4304#[cfg_attr(feature = "serde", serde(tag = "type"))]
4305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4306#[repr(u32)]
4307#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
4308pub enum MavFuelType {
4309 #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
4310 MAV_FUEL_TYPE_UNKNOWN = 0,
4311 #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
4312 MAV_FUEL_TYPE_LIQUID = 1,
4313 #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
4314 MAV_FUEL_TYPE_GAS = 2,
4315}
4316impl MavFuelType {
4317 pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
4318}
4319impl Default for MavFuelType {
4320 fn default() -> Self {
4321 Self::DEFAULT
4322 }
4323}
4324bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
4325impl MavGeneratorStatusFlag {
4326 pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
4327}
4328impl Default for MavGeneratorStatusFlag {
4329 fn default() -> Self {
4330 Self::DEFAULT
4331 }
4332}
4333#[cfg_attr(feature = "ts", derive(TS))]
4334#[cfg_attr(feature = "ts", ts(export))]
4335#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4337#[cfg_attr(feature = "serde", serde(tag = "type"))]
4338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4339#[repr(u32)]
4340#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
4341pub enum MavGoto {
4342 #[doc = "Hold at the current position."]
4343 MAV_GOTO_DO_HOLD = 0,
4344 #[doc = "Continue with the next item in mission execution."]
4345 MAV_GOTO_DO_CONTINUE = 1,
4346 #[doc = "Hold at the current position of the system"]
4347 MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
4348 #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
4349 MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
4350}
4351impl MavGoto {
4352 pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
4353}
4354impl Default for MavGoto {
4355 fn default() -> Self {
4356 Self::DEFAULT
4357 }
4358}
4359#[cfg_attr(feature = "ts", derive(TS))]
4360#[cfg_attr(feature = "ts", ts(export))]
4361#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4363#[cfg_attr(feature = "serde", serde(tag = "type"))]
4364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4365#[repr(u32)]
4366#[doc = "Enumeration of landed detector states"]
4367pub enum MavLandedState {
4368 #[doc = "MAV landed state is unknown"]
4369 MAV_LANDED_STATE_UNDEFINED = 0,
4370 #[doc = "MAV is landed (on ground)"]
4371 MAV_LANDED_STATE_ON_GROUND = 1,
4372 #[doc = "MAV is in air"]
4373 MAV_LANDED_STATE_IN_AIR = 2,
4374 #[doc = "MAV currently taking off"]
4375 MAV_LANDED_STATE_TAKEOFF = 3,
4376 #[doc = "MAV currently landing"]
4377 MAV_LANDED_STATE_LANDING = 4,
4378}
4379impl MavLandedState {
4380 pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
4381}
4382impl Default for MavLandedState {
4383 fn default() -> Self {
4384 Self::DEFAULT
4385 }
4386}
4387#[cfg_attr(feature = "ts", derive(TS))]
4388#[cfg_attr(feature = "ts", ts(export))]
4389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4391#[cfg_attr(feature = "serde", serde(tag = "type"))]
4392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4393#[repr(u32)]
4394#[doc = "Result of mission operation (in a MISSION_ACK message)."]
4395pub enum MavMissionResult {
4396 #[doc = "mission accepted OK"]
4397 MAV_MISSION_ACCEPTED = 0,
4398 #[doc = "Generic error / not accepting mission commands at all right now."]
4399 MAV_MISSION_ERROR = 1,
4400 #[doc = "Coordinate frame is not supported."]
4401 MAV_MISSION_UNSUPPORTED_FRAME = 2,
4402 #[doc = "Command is not supported."]
4403 MAV_MISSION_UNSUPPORTED = 3,
4404 #[doc = "Mission items exceed storage space."]
4405 MAV_MISSION_NO_SPACE = 4,
4406 #[doc = "One of the parameters has an invalid value."]
4407 MAV_MISSION_INVALID = 5,
4408 #[doc = "param1 has an invalid value."]
4409 MAV_MISSION_INVALID_PARAM1 = 6,
4410 #[doc = "param2 has an invalid value."]
4411 MAV_MISSION_INVALID_PARAM2 = 7,
4412 #[doc = "param3 has an invalid value."]
4413 MAV_MISSION_INVALID_PARAM3 = 8,
4414 #[doc = "param4 has an invalid value."]
4415 MAV_MISSION_INVALID_PARAM4 = 9,
4416 #[doc = "x / param5 has an invalid value."]
4417 MAV_MISSION_INVALID_PARAM5_X = 10,
4418 #[doc = "y / param6 has an invalid value."]
4419 MAV_MISSION_INVALID_PARAM6_Y = 11,
4420 #[doc = "z / param7 has an invalid value."]
4421 MAV_MISSION_INVALID_PARAM7 = 12,
4422 #[doc = "Mission item received out of sequence"]
4423 MAV_MISSION_INVALID_SEQUENCE = 13,
4424 #[doc = "Not accepting any mission commands from this communication partner."]
4425 MAV_MISSION_DENIED = 14,
4426 #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
4427 MAV_MISSION_OPERATION_CANCELLED = 15,
4428}
4429impl MavMissionResult {
4430 pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
4431}
4432impl Default for MavMissionResult {
4433 fn default() -> Self {
4434 Self::DEFAULT
4435 }
4436}
4437#[cfg_attr(feature = "ts", derive(TS))]
4438#[cfg_attr(feature = "ts", ts(export))]
4439#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4441#[cfg_attr(feature = "serde", serde(tag = "type"))]
4442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4443#[repr(u32)]
4444#[doc = "Type of mission items being requested/sent in mission protocol."]
4445pub enum MavMissionType {
4446 #[doc = "Items are mission commands for main mission."]
4447 MAV_MISSION_TYPE_MISSION = 0,
4448 #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
4449 MAV_MISSION_TYPE_FENCE = 1,
4450 #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
4451 MAV_MISSION_TYPE_RALLY = 2,
4452 #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
4453 MAV_MISSION_TYPE_ALL = 255,
4454}
4455impl MavMissionType {
4456 pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
4457}
4458impl Default for MavMissionType {
4459 fn default() -> Self {
4460 Self::DEFAULT
4461 }
4462}
4463#[cfg_attr(feature = "ts", derive(TS))]
4464#[cfg_attr(feature = "ts", ts(export))]
4465#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4466#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4467#[cfg_attr(feature = "serde", serde(tag = "type"))]
4468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4469#[repr(u32)]
4470#[deprecated = "Using MAV_MODE to set modes is less predictable than using standard modes (MAV_STANDARD_MODE) or custom modes (MAV_MODE_FLAG_CUSTOM_MODE_ENABLED). See `MAV_MODE_FLAG` (Deprecated since 2025-02)"]
4471#[doc = "Predefined OR-combined MAV_MODE_FLAG values. These can simplify using the flags when setting modes. Note that manual input is enabled in all modes as a safety override."]
4472pub enum MavMode {
4473 #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
4474 MAV_MODE_PREFLIGHT = 0,
4475 #[doc = "System is allowed to be active, under assisted RC control (MAV_MODE_FLAG_SAFETY_ARMED, MAV_MODE_FLAG_STABILIZE_ENABLED)"]
4476 MAV_MODE_STABILIZE_DISARMED = 80,
4477 #[doc = "System is allowed to be active, under assisted RC control (MAV_MODE_FLAG_SAFETY_ARMED, MAV_MODE_FLAG_MANUAL_INPUT_ENABLED, MAV_MODE_FLAG_STABILIZE_ENABLED)"]
4478 MAV_MODE_STABILIZE_ARMED = 208,
4479 #[doc = "System is allowed to be active, under manual (RC) control, no stabilization (MAV_MODE_FLAG_MANUAL_INPUT_ENABLED)"]
4480 MAV_MODE_MANUAL_DISARMED = 64,
4481 #[doc = "System is allowed to be active, under manual (RC) control, no stabilization (MAV_MODE_FLAG_SAFETY_ARMED, MAV_MODE_FLAG_MANUAL_INPUT_ENABLED)"]
4482 MAV_MODE_MANUAL_ARMED = 192,
4483 #[doc = "System is allowed to be active, under autonomous control, manual setpoint (MAV_MODE_FLAG_SAFETY_ARMED, MAV_MODE_FLAG_STABILIZE_ENABLED, MAV_MODE_FLAG_GUIDED_ENABLED)"]
4484 MAV_MODE_GUIDED_DISARMED = 88,
4485 #[doc = "System is allowed to be active, under autonomous control, manual setpoint (MAV_MODE_FLAG_SAFETY_ARMED, MAV_MODE_FLAG_MANUAL_INPUT_ENABLED, MAV_MODE_FLAG_STABILIZE_ENABLED, MAV_MODE_FLAG_GUIDED_ENABLED)"]
4486 MAV_MODE_GUIDED_ARMED = 216,
4487 #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints). (MAV_MODE_FLAG_SAFETY_ARMED, MAV_MODE_FLAG_STABILIZE_ENABLED, MAV_MODE_FLAG_GUIDED_ENABLED, MAV_MODE_FLAG_AUTO_ENABLED)."]
4488 MAV_MODE_AUTO_DISARMED = 92,
4489 #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints). (MAV_MODE_FLAG_SAFETY_ARMED, MAV_MODE_FLAG_MANUAL_INPUT_ENABLED, MAV_MODE_FLAG_STABILIZE_ENABLED, MAV_MODE_FLAG_GUIDED_ENABLED,MAV_MODE_FLAG_AUTO_ENABLED)."]
4490 MAV_MODE_AUTO_ARMED = 220,
4491 #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. (MAV_MODE_FLAG_MANUAL_INPUT_ENABLED, MAV_MODE_FLAG_TEST_ENABLED)."]
4492 MAV_MODE_TEST_DISARMED = 66,
4493 #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only (MAV_MODE_FLAG_SAFETY_ARMED, MAV_MODE_FLAG_MANUAL_INPUT_ENABLED, MAV_MODE_FLAG_TEST_ENABLED)"]
4494 MAV_MODE_TEST_ARMED = 194,
4495}
4496impl MavMode {
4497 pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
4498}
4499impl Default for MavMode {
4500 fn default() -> Self {
4501 Self::DEFAULT
4502 }
4503}
4504bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode, see MAV_MODE enum for useful combinations."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 system-specific custom mode is enabled. When using this flag to enable a custom mode all other flags should be ignored."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
4505impl MavModeFlag {
4506 pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
4507}
4508impl Default for MavModeFlag {
4509 fn default() -> Self {
4510 Self::DEFAULT
4511 }
4512}
4513#[cfg_attr(feature = "ts", derive(TS))]
4514#[cfg_attr(feature = "ts", ts(export))]
4515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4517#[cfg_attr(feature = "serde", serde(tag = "type"))]
4518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4519#[repr(u32)]
4520#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
4521pub enum MavModeFlagDecodePosition {
4522 #[doc = "First bit: 10000000"]
4523 MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
4524 #[doc = "Second bit: 01000000"]
4525 MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
4526 #[doc = "Third bit: 00100000"]
4527 MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
4528 #[doc = "Fourth bit: 00010000"]
4529 MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
4530 #[doc = "Fifth bit: 00001000"]
4531 MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
4532 #[doc = "Sixth bit: 00000100"]
4533 MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
4534 #[doc = "Seventh bit: 00000010"]
4535 MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
4536 #[doc = "Eighth bit: 00000001"]
4537 MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
4538}
4539impl MavModeFlagDecodePosition {
4540 pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
4541}
4542impl Default for MavModeFlagDecodePosition {
4543 fn default() -> Self {
4544 Self::DEFAULT
4545 }
4546}
4547bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode. For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not. A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes. The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller). If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
4548impl MavModeProperty {
4549 pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
4550}
4551impl Default for MavModeProperty {
4552 fn default() -> Self {
4553 Self::DEFAULT
4554 }
4555}
4556#[cfg_attr(feature = "ts", derive(TS))]
4557#[cfg_attr(feature = "ts", ts(export))]
4558#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4560#[cfg_attr(feature = "serde", serde(tag = "type"))]
4561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4562#[repr(u32)]
4563#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
4564#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
4565pub enum MavMountMode {
4566 #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
4567 MAV_MOUNT_MODE_RETRACT = 0,
4568 #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
4569 MAV_MOUNT_MODE_NEUTRAL = 1,
4570 #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
4571 MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
4572 #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
4573 MAV_MOUNT_MODE_RC_TARGETING = 3,
4574 #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
4575 MAV_MOUNT_MODE_GPS_POINT = 4,
4576 #[doc = "Gimbal tracks system with specified system ID"]
4577 MAV_MOUNT_MODE_SYSID_TARGET = 5,
4578 #[doc = "Gimbal tracks home position"]
4579 MAV_MOUNT_MODE_HOME_LOCATION = 6,
4580}
4581impl MavMountMode {
4582 pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
4583}
4584impl Default for MavMountMode {
4585 fn default() -> Self {
4586 Self::DEFAULT
4587 }
4588}
4589#[cfg_attr(feature = "ts", derive(TS))]
4590#[cfg_attr(feature = "ts", ts(export))]
4591#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4593#[cfg_attr(feature = "serde", serde(tag = "type"))]
4594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4595#[repr(u32)]
4596pub enum MavOdidArmStatus {
4597 #[doc = "Passing arming checks."]
4598 MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
4599 #[doc = "Generic arming failure, see error string for details."]
4600 MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
4601}
4602impl MavOdidArmStatus {
4603 pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
4604}
4605impl Default for MavOdidArmStatus {
4606 fn default() -> Self {
4607 Self::DEFAULT
4608 }
4609}
4610#[cfg_attr(feature = "ts", derive(TS))]
4611#[cfg_attr(feature = "ts", ts(export))]
4612#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4614#[cfg_attr(feature = "serde", serde(tag = "type"))]
4615#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4616#[repr(u32)]
4617pub enum MavOdidAuthType {
4618 #[doc = "No authentication type is specified."]
4619 MAV_ODID_AUTH_TYPE_NONE = 0,
4620 #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
4621 MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
4622 #[doc = "Signature for the Operator ID."]
4623 MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
4624 #[doc = "Signature for the entire message set."]
4625 MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
4626 #[doc = "Authentication is provided by Network Remote ID."]
4627 MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
4628 #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
4629 MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
4630}
4631impl MavOdidAuthType {
4632 pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
4633}
4634impl Default for MavOdidAuthType {
4635 fn default() -> Self {
4636 Self::DEFAULT
4637 }
4638}
4639#[cfg_attr(feature = "ts", derive(TS))]
4640#[cfg_attr(feature = "ts", ts(export))]
4641#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4643#[cfg_attr(feature = "serde", serde(tag = "type"))]
4644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4645#[repr(u32)]
4646pub enum MavOdidCategoryEu {
4647 #[doc = "The category for the UA, according to the EU specification, is undeclared."]
4648 MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
4649 #[doc = "The category for the UA, according to the EU specification, is the Open category."]
4650 MAV_ODID_CATEGORY_EU_OPEN = 1,
4651 #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
4652 MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
4653 #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
4654 MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
4655}
4656impl MavOdidCategoryEu {
4657 pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
4658}
4659impl Default for MavOdidCategoryEu {
4660 fn default() -> Self {
4661 Self::DEFAULT
4662 }
4663}
4664#[cfg_attr(feature = "ts", derive(TS))]
4665#[cfg_attr(feature = "ts", ts(export))]
4666#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4668#[cfg_attr(feature = "serde", serde(tag = "type"))]
4669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4670#[repr(u32)]
4671pub enum MavOdidClassEu {
4672 #[doc = "The class for the UA, according to the EU specification, is undeclared."]
4673 MAV_ODID_CLASS_EU_UNDECLARED = 0,
4674 #[doc = "The class for the UA, according to the EU specification, is Class 0."]
4675 MAV_ODID_CLASS_EU_CLASS_0 = 1,
4676 #[doc = "The class for the UA, according to the EU specification, is Class 1."]
4677 MAV_ODID_CLASS_EU_CLASS_1 = 2,
4678 #[doc = "The class for the UA, according to the EU specification, is Class 2."]
4679 MAV_ODID_CLASS_EU_CLASS_2 = 3,
4680 #[doc = "The class for the UA, according to the EU specification, is Class 3."]
4681 MAV_ODID_CLASS_EU_CLASS_3 = 4,
4682 #[doc = "The class for the UA, according to the EU specification, is Class 4."]
4683 MAV_ODID_CLASS_EU_CLASS_4 = 5,
4684 #[doc = "The class for the UA, according to the EU specification, is Class 5."]
4685 MAV_ODID_CLASS_EU_CLASS_5 = 6,
4686 #[doc = "The class for the UA, according to the EU specification, is Class 6."]
4687 MAV_ODID_CLASS_EU_CLASS_6 = 7,
4688}
4689impl MavOdidClassEu {
4690 pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
4691}
4692impl Default for MavOdidClassEu {
4693 fn default() -> Self {
4694 Self::DEFAULT
4695 }
4696}
4697#[cfg_attr(feature = "ts", derive(TS))]
4698#[cfg_attr(feature = "ts", ts(export))]
4699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4701#[cfg_attr(feature = "serde", serde(tag = "type"))]
4702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4703#[repr(u32)]
4704pub enum MavOdidClassificationType {
4705 #[doc = "The classification type for the UA is undeclared."]
4706 MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
4707 #[doc = "The classification type for the UA follows EU (European Union) specifications."]
4708 MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
4709}
4710impl MavOdidClassificationType {
4711 pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
4712}
4713impl Default for MavOdidClassificationType {
4714 fn default() -> Self {
4715 Self::DEFAULT
4716 }
4717}
4718#[cfg_attr(feature = "ts", derive(TS))]
4719#[cfg_attr(feature = "ts", ts(export))]
4720#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4722#[cfg_attr(feature = "serde", serde(tag = "type"))]
4723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4724#[repr(u32)]
4725pub enum MavOdidDescType {
4726 #[doc = "Optional free-form text description of the purpose of the flight."]
4727 MAV_ODID_DESC_TYPE_TEXT = 0,
4728 #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
4729 MAV_ODID_DESC_TYPE_EMERGENCY = 1,
4730 #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
4731 MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
4732}
4733impl MavOdidDescType {
4734 pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
4735}
4736impl Default for MavOdidDescType {
4737 fn default() -> Self {
4738 Self::DEFAULT
4739 }
4740}
4741#[cfg_attr(feature = "ts", derive(TS))]
4742#[cfg_attr(feature = "ts", ts(export))]
4743#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4745#[cfg_attr(feature = "serde", serde(tag = "type"))]
4746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4747#[repr(u32)]
4748pub enum MavOdidHeightRef {
4749 #[doc = "The height field is relative to the take-off location."]
4750 MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
4751 #[doc = "The height field is relative to ground."]
4752 MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
4753}
4754impl MavOdidHeightRef {
4755 pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
4756}
4757impl Default for MavOdidHeightRef {
4758 fn default() -> Self {
4759 Self::DEFAULT
4760 }
4761}
4762#[cfg_attr(feature = "ts", derive(TS))]
4763#[cfg_attr(feature = "ts", ts(export))]
4764#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4766#[cfg_attr(feature = "serde", serde(tag = "type"))]
4767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4768#[repr(u32)]
4769pub enum MavOdidHorAcc {
4770 #[doc = "The horizontal accuracy is unknown."]
4771 MAV_ODID_HOR_ACC_UNKNOWN = 0,
4772 #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
4773 MAV_ODID_HOR_ACC_10NM = 1,
4774 #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
4775 MAV_ODID_HOR_ACC_4NM = 2,
4776 #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
4777 MAV_ODID_HOR_ACC_2NM = 3,
4778 #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
4779 MAV_ODID_HOR_ACC_1NM = 4,
4780 #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
4781 MAV_ODID_HOR_ACC_0_5NM = 5,
4782 #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
4783 MAV_ODID_HOR_ACC_0_3NM = 6,
4784 #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
4785 MAV_ODID_HOR_ACC_0_1NM = 7,
4786 #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
4787 MAV_ODID_HOR_ACC_0_05NM = 8,
4788 #[doc = "The horizontal accuracy is smaller than 30 meter."]
4789 MAV_ODID_HOR_ACC_30_METER = 9,
4790 #[doc = "The horizontal accuracy is smaller than 10 meter."]
4791 MAV_ODID_HOR_ACC_10_METER = 10,
4792 #[doc = "The horizontal accuracy is smaller than 3 meter."]
4793 MAV_ODID_HOR_ACC_3_METER = 11,
4794 #[doc = "The horizontal accuracy is smaller than 1 meter."]
4795 MAV_ODID_HOR_ACC_1_METER = 12,
4796}
4797impl MavOdidHorAcc {
4798 pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
4799}
4800impl Default for MavOdidHorAcc {
4801 fn default() -> Self {
4802 Self::DEFAULT
4803 }
4804}
4805#[cfg_attr(feature = "ts", derive(TS))]
4806#[cfg_attr(feature = "ts", ts(export))]
4807#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4808#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4809#[cfg_attr(feature = "serde", serde(tag = "type"))]
4810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4811#[repr(u32)]
4812pub enum MavOdidIdType {
4813 #[doc = "No type defined."]
4814 MAV_ODID_ID_TYPE_NONE = 0,
4815 #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
4816 MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
4817 #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
4818 MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
4819 #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
4820 MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
4821 #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
4822 MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
4823}
4824impl MavOdidIdType {
4825 pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
4826}
4827impl Default for MavOdidIdType {
4828 fn default() -> Self {
4829 Self::DEFAULT
4830 }
4831}
4832#[cfg_attr(feature = "ts", derive(TS))]
4833#[cfg_attr(feature = "ts", ts(export))]
4834#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4836#[cfg_attr(feature = "serde", serde(tag = "type"))]
4837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4838#[repr(u32)]
4839pub enum MavOdidOperatorIdType {
4840 #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
4841 MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
4842}
4843impl MavOdidOperatorIdType {
4844 pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
4845}
4846impl Default for MavOdidOperatorIdType {
4847 fn default() -> Self {
4848 Self::DEFAULT
4849 }
4850}
4851#[cfg_attr(feature = "ts", derive(TS))]
4852#[cfg_attr(feature = "ts", ts(export))]
4853#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4855#[cfg_attr(feature = "serde", serde(tag = "type"))]
4856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4857#[repr(u32)]
4858pub enum MavOdidOperatorLocationType {
4859 #[doc = "The location/altitude of the operator is the same as the take-off location."]
4860 MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
4861 #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
4862 MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
4863 #[doc = "The location/altitude of the operator are fixed values."]
4864 MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
4865}
4866impl MavOdidOperatorLocationType {
4867 pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
4868}
4869impl Default for MavOdidOperatorLocationType {
4870 fn default() -> Self {
4871 Self::DEFAULT
4872 }
4873}
4874#[cfg_attr(feature = "ts", derive(TS))]
4875#[cfg_attr(feature = "ts", ts(export))]
4876#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4878#[cfg_attr(feature = "serde", serde(tag = "type"))]
4879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4880#[repr(u32)]
4881pub enum MavOdidSpeedAcc {
4882 #[doc = "The speed accuracy is unknown."]
4883 MAV_ODID_SPEED_ACC_UNKNOWN = 0,
4884 #[doc = "The speed accuracy is smaller than 10 meters per second."]
4885 MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
4886 #[doc = "The speed accuracy is smaller than 3 meters per second."]
4887 MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
4888 #[doc = "The speed accuracy is smaller than 1 meters per second."]
4889 MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
4890 #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
4891 MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
4892}
4893impl MavOdidSpeedAcc {
4894 pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
4895}
4896impl Default for MavOdidSpeedAcc {
4897 fn default() -> Self {
4898 Self::DEFAULT
4899 }
4900}
4901#[cfg_attr(feature = "ts", derive(TS))]
4902#[cfg_attr(feature = "ts", ts(export))]
4903#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4905#[cfg_attr(feature = "serde", serde(tag = "type"))]
4906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4907#[repr(u32)]
4908pub enum MavOdidStatus {
4909 #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
4910 MAV_ODID_STATUS_UNDECLARED = 0,
4911 #[doc = "The UA is on the ground."]
4912 MAV_ODID_STATUS_GROUND = 1,
4913 #[doc = "The UA is in the air."]
4914 MAV_ODID_STATUS_AIRBORNE = 2,
4915 #[doc = "The UA is having an emergency."]
4916 MAV_ODID_STATUS_EMERGENCY = 3,
4917 #[doc = "The remote ID system is failing or unreliable in some way."]
4918 MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
4919}
4920impl MavOdidStatus {
4921 pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
4922}
4923impl Default for MavOdidStatus {
4924 fn default() -> Self {
4925 Self::DEFAULT
4926 }
4927}
4928#[cfg_attr(feature = "ts", derive(TS))]
4929#[cfg_attr(feature = "ts", ts(export))]
4930#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4932#[cfg_attr(feature = "serde", serde(tag = "type"))]
4933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4934#[repr(u32)]
4935pub enum MavOdidTimeAcc {
4936 #[doc = "The timestamp accuracy is unknown."]
4937 MAV_ODID_TIME_ACC_UNKNOWN = 0,
4938 #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
4939 MAV_ODID_TIME_ACC_0_1_SECOND = 1,
4940 #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
4941 MAV_ODID_TIME_ACC_0_2_SECOND = 2,
4942 #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
4943 MAV_ODID_TIME_ACC_0_3_SECOND = 3,
4944 #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
4945 MAV_ODID_TIME_ACC_0_4_SECOND = 4,
4946 #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
4947 MAV_ODID_TIME_ACC_0_5_SECOND = 5,
4948 #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
4949 MAV_ODID_TIME_ACC_0_6_SECOND = 6,
4950 #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
4951 MAV_ODID_TIME_ACC_0_7_SECOND = 7,
4952 #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
4953 MAV_ODID_TIME_ACC_0_8_SECOND = 8,
4954 #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
4955 MAV_ODID_TIME_ACC_0_9_SECOND = 9,
4956 #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
4957 MAV_ODID_TIME_ACC_1_0_SECOND = 10,
4958 #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
4959 MAV_ODID_TIME_ACC_1_1_SECOND = 11,
4960 #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
4961 MAV_ODID_TIME_ACC_1_2_SECOND = 12,
4962 #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
4963 MAV_ODID_TIME_ACC_1_3_SECOND = 13,
4964 #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
4965 MAV_ODID_TIME_ACC_1_4_SECOND = 14,
4966 #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
4967 MAV_ODID_TIME_ACC_1_5_SECOND = 15,
4968}
4969impl MavOdidTimeAcc {
4970 pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
4971}
4972impl Default for MavOdidTimeAcc {
4973 fn default() -> Self {
4974 Self::DEFAULT
4975 }
4976}
4977#[cfg_attr(feature = "ts", derive(TS))]
4978#[cfg_attr(feature = "ts", ts(export))]
4979#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4981#[cfg_attr(feature = "serde", serde(tag = "type"))]
4982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4983#[repr(u32)]
4984pub enum MavOdidUaType {
4985 #[doc = "No UA (Unmanned Aircraft) type defined."]
4986 MAV_ODID_UA_TYPE_NONE = 0,
4987 #[doc = "Aeroplane/Airplane. Fixed wing."]
4988 MAV_ODID_UA_TYPE_AEROPLANE = 1,
4989 #[doc = "Helicopter or multirotor."]
4990 MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
4991 #[doc = "Gyroplane."]
4992 MAV_ODID_UA_TYPE_GYROPLANE = 3,
4993 #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
4994 MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
4995 #[doc = "Ornithopter."]
4996 MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
4997 #[doc = "Glider."]
4998 MAV_ODID_UA_TYPE_GLIDER = 6,
4999 #[doc = "Kite."]
5000 MAV_ODID_UA_TYPE_KITE = 7,
5001 #[doc = "Free Balloon."]
5002 MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
5003 #[doc = "Captive Balloon."]
5004 MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
5005 #[doc = "Airship. E.g. a blimp."]
5006 MAV_ODID_UA_TYPE_AIRSHIP = 10,
5007 #[doc = "Free Fall/Parachute (unpowered)."]
5008 MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
5009 #[doc = "Rocket."]
5010 MAV_ODID_UA_TYPE_ROCKET = 12,
5011 #[doc = "Tethered powered aircraft."]
5012 MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
5013 #[doc = "Ground Obstacle."]
5014 MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
5015 #[doc = "Other type of aircraft not listed earlier."]
5016 MAV_ODID_UA_TYPE_OTHER = 15,
5017}
5018impl MavOdidUaType {
5019 pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
5020}
5021impl Default for MavOdidUaType {
5022 fn default() -> Self {
5023 Self::DEFAULT
5024 }
5025}
5026#[cfg_attr(feature = "ts", derive(TS))]
5027#[cfg_attr(feature = "ts", ts(export))]
5028#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5030#[cfg_attr(feature = "serde", serde(tag = "type"))]
5031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5032#[repr(u32)]
5033pub enum MavOdidVerAcc {
5034 #[doc = "The vertical accuracy is unknown."]
5035 MAV_ODID_VER_ACC_UNKNOWN = 0,
5036 #[doc = "The vertical accuracy is smaller than 150 meter."]
5037 MAV_ODID_VER_ACC_150_METER = 1,
5038 #[doc = "The vertical accuracy is smaller than 45 meter."]
5039 MAV_ODID_VER_ACC_45_METER = 2,
5040 #[doc = "The vertical accuracy is smaller than 25 meter."]
5041 MAV_ODID_VER_ACC_25_METER = 3,
5042 #[doc = "The vertical accuracy is smaller than 10 meter."]
5043 MAV_ODID_VER_ACC_10_METER = 4,
5044 #[doc = "The vertical accuracy is smaller than 3 meter."]
5045 MAV_ODID_VER_ACC_3_METER = 5,
5046 #[doc = "The vertical accuracy is smaller than 1 meter."]
5047 MAV_ODID_VER_ACC_1_METER = 6,
5048}
5049impl MavOdidVerAcc {
5050 pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
5051}
5052impl Default for MavOdidVerAcc {
5053 fn default() -> Self {
5054 Self::DEFAULT
5055 }
5056}
5057#[cfg_attr(feature = "ts", derive(TS))]
5058#[cfg_attr(feature = "ts", ts(export))]
5059#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5061#[cfg_attr(feature = "serde", serde(tag = "type"))]
5062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5063#[repr(u32)]
5064#[doc = "Parameter protocol error types (see PARAM_ERROR)."]
5065pub enum MavParamError {
5066 #[doc = "No error occurred (not expected in PARAM_ERROR but may be used in future implementations."]
5067 MAV_PARAM_ERROR_NO_ERROR = 0,
5068 #[doc = "Parameter does not exist"]
5069 MAV_PARAM_ERROR_DOES_NOT_EXIST = 1,
5070 #[doc = "Parameter value does not fit within accepted range"]
5071 MAV_PARAM_ERROR_VALUE_OUT_OF_RANGE = 2,
5072 #[doc = "Caller is not permitted to set the value of this parameter"]
5073 MAV_PARAM_ERROR_PERMISSION_DENIED = 3,
5074 #[doc = "Unknown component specified"]
5075 MAV_PARAM_ERROR_COMPONENT_NOT_FOUND = 4,
5076 #[doc = "Parameter is read-only"]
5077 MAV_PARAM_ERROR_READ_ONLY = 5,
5078 #[doc = "Parameter data type (MAV_PARAM_TYPE) is not supported by flight stack (at all)"]
5079 MAV_PARAM_ERROR_TYPE_UNSUPPORTED = 6,
5080 #[doc = "Parameter type does not match expected type"]
5081 MAV_PARAM_ERROR_TYPE_MISMATCH = 7,
5082 #[doc = "Parameter exists but reading failed"]
5083 MAV_PARAM_ERROR_READ_FAIL = 8,
5084}
5085impl MavParamError {
5086 pub const DEFAULT: Self = Self::MAV_PARAM_ERROR_NO_ERROR;
5087}
5088impl Default for MavParamError {
5089 fn default() -> Self {
5090 Self::DEFAULT
5091 }
5092}
5093#[cfg_attr(feature = "ts", derive(TS))]
5094#[cfg_attr(feature = "ts", ts(export))]
5095#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5096#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5097#[cfg_attr(feature = "serde", serde(tag = "type"))]
5098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5099#[repr(u32)]
5100#[doc = "Specifies the datatype of a MAVLink extended parameter."]
5101pub enum MavParamExtType {
5102 #[doc = "8-bit unsigned integer"]
5103 MAV_PARAM_EXT_TYPE_UINT8 = 1,
5104 #[doc = "8-bit signed integer"]
5105 MAV_PARAM_EXT_TYPE_INT8 = 2,
5106 #[doc = "16-bit unsigned integer"]
5107 MAV_PARAM_EXT_TYPE_UINT16 = 3,
5108 #[doc = "16-bit signed integer"]
5109 MAV_PARAM_EXT_TYPE_INT16 = 4,
5110 #[doc = "32-bit unsigned integer"]
5111 MAV_PARAM_EXT_TYPE_UINT32 = 5,
5112 #[doc = "32-bit signed integer"]
5113 MAV_PARAM_EXT_TYPE_INT32 = 6,
5114 #[doc = "64-bit unsigned integer"]
5115 MAV_PARAM_EXT_TYPE_UINT64 = 7,
5116 #[doc = "64-bit signed integer"]
5117 MAV_PARAM_EXT_TYPE_INT64 = 8,
5118 #[doc = "32-bit floating-point"]
5119 MAV_PARAM_EXT_TYPE_REAL32 = 9,
5120 #[doc = "64-bit floating-point"]
5121 MAV_PARAM_EXT_TYPE_REAL64 = 10,
5122 #[doc = "Custom Type"]
5123 MAV_PARAM_EXT_TYPE_CUSTOM = 11,
5124}
5125impl MavParamExtType {
5126 pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
5127}
5128impl Default for MavParamExtType {
5129 fn default() -> Self {
5130 Self::DEFAULT
5131 }
5132}
5133#[cfg_attr(feature = "ts", derive(TS))]
5134#[cfg_attr(feature = "ts", ts(export))]
5135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5137#[cfg_attr(feature = "serde", serde(tag = "type"))]
5138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5139#[repr(u32)]
5140#[doc = "Specifies the datatype of a MAVLink parameter."]
5141pub enum MavParamType {
5142 #[doc = "8-bit unsigned integer"]
5143 MAV_PARAM_TYPE_UINT8 = 1,
5144 #[doc = "8-bit signed integer"]
5145 MAV_PARAM_TYPE_INT8 = 2,
5146 #[doc = "16-bit unsigned integer"]
5147 MAV_PARAM_TYPE_UINT16 = 3,
5148 #[doc = "16-bit signed integer"]
5149 MAV_PARAM_TYPE_INT16 = 4,
5150 #[doc = "32-bit unsigned integer"]
5151 MAV_PARAM_TYPE_UINT32 = 5,
5152 #[doc = "32-bit signed integer"]
5153 MAV_PARAM_TYPE_INT32 = 6,
5154 #[doc = "64-bit unsigned integer"]
5155 MAV_PARAM_TYPE_UINT64 = 7,
5156 #[doc = "64-bit signed integer"]
5157 MAV_PARAM_TYPE_INT64 = 8,
5158 #[doc = "32-bit floating-point"]
5159 MAV_PARAM_TYPE_REAL32 = 9,
5160 #[doc = "64-bit floating-point"]
5161 MAV_PARAM_TYPE_REAL64 = 10,
5162}
5163impl MavParamType {
5164 pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
5165}
5166impl Default for MavParamType {
5167 fn default() -> Self {
5168 Self::DEFAULT
5169 }
5170}
5171bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
5172impl MavPowerStatus {
5173 pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
5174}
5175impl Default for MavPowerStatus {
5176 fn default() -> Self {
5177 Self::DEFAULT
5178 }
5179}
5180bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type. Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_ITEM_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type. Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>. Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>. Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; # [doc = "Autopilot has a connected gripper. MAVLink Grippers would set MAV_TYPE_GRIPPER instead."] const MAV_PROTOCOL_CAPABILITY_GRIPPER = 1048576 ; } }
5181impl MavProtocolCapability {
5182 pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
5183}
5184impl Default for MavProtocolCapability {
5185 fn default() -> Self {
5186 Self::DEFAULT
5187 }
5188}
5189#[cfg_attr(feature = "ts", derive(TS))]
5190#[cfg_attr(feature = "ts", ts(export))]
5191#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5192#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5193#[cfg_attr(feature = "serde", serde(tag = "type"))]
5194#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5195#[repr(u32)]
5196#[doc = "Result from a MAVLink command (MAV_CMD)"]
5197pub enum MavResult {
5198 #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
5199 MAV_RESULT_ACCEPTED = 0,
5200 #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
5201 MAV_RESULT_TEMPORARILY_REJECTED = 1,
5202 #[doc = "Command is invalid; it is supported but one or more parameter values are invalid (i.e. parameter reserved, value allowed by spec but not supported by flight stack, and so on). Retrying the same command and parameters will not work."]
5203 MAV_RESULT_DENIED = 2,
5204 #[doc = "Command is not supported (unknown)."]
5205 MAV_RESULT_UNSUPPORTED = 3,
5206 #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
5207 MAV_RESULT_FAILED = 4,
5208 #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
5209 MAV_RESULT_IN_PROGRESS = 5,
5210 #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
5211 MAV_RESULT_CANCELLED = 6,
5212 #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
5213 MAV_RESULT_COMMAND_LONG_ONLY = 7,
5214 #[doc = "Command is only accepted when sent as a COMMAND_INT."]
5215 MAV_RESULT_COMMAND_INT_ONLY = 8,
5216 #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
5217 MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
5218 #[doc = "Command has been rejected because source system is not in control of the target system/component."]
5219 MAV_RESULT_NOT_IN_CONTROL = 10,
5220}
5221impl MavResult {
5222 pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
5223}
5224impl Default for MavResult {
5225 fn default() -> Self {
5226 Self::DEFAULT
5227 }
5228}
5229#[cfg_attr(feature = "ts", derive(TS))]
5230#[cfg_attr(feature = "ts", ts(export))]
5231#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5233#[cfg_attr(feature = "serde", serde(tag = "type"))]
5234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5235#[repr(u32)]
5236#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Superseded since 2018-01)"]
5237#[doc = "The ROI (region of interest) for the vehicle. This can be be used by the vehicle for camera/vehicle attitude alignment (see MAV_CMD_NAV_ROI)."]
5238pub enum MavRoi {
5239 #[doc = "No region of interest."]
5240 MAV_ROI_NONE = 0,
5241 #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
5242 MAV_ROI_WPNEXT = 1,
5243 #[doc = "Point toward given waypoint."]
5244 MAV_ROI_WPINDEX = 2,
5245 #[doc = "Point toward fixed location."]
5246 MAV_ROI_LOCATION = 3,
5247 #[doc = "Point toward of given id."]
5248 MAV_ROI_TARGET = 4,
5249}
5250impl MavRoi {
5251 pub const DEFAULT: Self = Self::MAV_ROI_NONE;
5252}
5253impl Default for MavRoi {
5254 fn default() -> Self {
5255 Self::DEFAULT
5256 }
5257}
5258#[cfg_attr(feature = "ts", derive(TS))]
5259#[cfg_attr(feature = "ts", ts(export))]
5260#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5262#[cfg_attr(feature = "serde", serde(tag = "type"))]
5263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5264#[repr(u32)]
5265#[doc = "Enumeration of sensor orientation, according to its rotations"]
5266pub enum MavSensorOrientation {
5267 #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
5268 MAV_SENSOR_ROTATION_NONE = 0,
5269 #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
5270 MAV_SENSOR_ROTATION_YAW_45 = 1,
5271 #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
5272 MAV_SENSOR_ROTATION_YAW_90 = 2,
5273 #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
5274 MAV_SENSOR_ROTATION_YAW_135 = 3,
5275 #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
5276 MAV_SENSOR_ROTATION_YAW_180 = 4,
5277 #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
5278 MAV_SENSOR_ROTATION_YAW_225 = 5,
5279 #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
5280 MAV_SENSOR_ROTATION_YAW_270 = 6,
5281 #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
5282 MAV_SENSOR_ROTATION_YAW_315 = 7,
5283 #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
5284 MAV_SENSOR_ROTATION_ROLL_180 = 8,
5285 #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
5286 MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
5287 #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
5288 MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
5289 #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
5290 MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
5291 #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
5292 MAV_SENSOR_ROTATION_PITCH_180 = 12,
5293 #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
5294 MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
5295 #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
5296 MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
5297 #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
5298 MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
5299 #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
5300 MAV_SENSOR_ROTATION_ROLL_90 = 16,
5301 #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
5302 MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
5303 #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
5304 MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
5305 #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
5306 MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
5307 #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
5308 MAV_SENSOR_ROTATION_ROLL_270 = 20,
5309 #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
5310 MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
5311 #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
5312 MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
5313 #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
5314 MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
5315 #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
5316 MAV_SENSOR_ROTATION_PITCH_90 = 24,
5317 #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
5318 MAV_SENSOR_ROTATION_PITCH_270 = 25,
5319 #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
5320 MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
5321 #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
5322 MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
5323 #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
5324 MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
5325 #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
5326 MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
5327 #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
5328 MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
5329 #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
5330 MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
5331 #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
5332 MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
5333 #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
5334 MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
5335 #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
5336 MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
5337 #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
5338 MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
5339 #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
5340 MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
5341 #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
5342 MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
5343 #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
5344 MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
5345 #[doc = "Pitch: 315"]
5346 MAV_SENSOR_ROTATION_PITCH_315 = 39,
5347 #[doc = "Roll: 90, Pitch: 315"]
5348 MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
5349 #[doc = "Custom orientation"]
5350 MAV_SENSOR_ROTATION_CUSTOM = 100,
5351}
5352impl MavSensorOrientation {
5353 pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
5354}
5355impl Default for MavSensorOrientation {
5356 fn default() -> Self {
5357 Self::DEFAULT
5358 }
5359}
5360#[cfg_attr(feature = "ts", derive(TS))]
5361#[cfg_attr(feature = "ts", ts(export))]
5362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5364#[cfg_attr(feature = "serde", serde(tag = "type"))]
5365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5366#[repr(u32)]
5367#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
5368pub enum MavSeverity {
5369 #[doc = "System is unusable. This is a \"panic\" condition."]
5370 MAV_SEVERITY_EMERGENCY = 0,
5371 #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
5372 MAV_SEVERITY_ALERT = 1,
5373 #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
5374 MAV_SEVERITY_CRITICAL = 2,
5375 #[doc = "Indicates an error in secondary/redundant systems."]
5376 MAV_SEVERITY_ERROR = 3,
5377 #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
5378 MAV_SEVERITY_WARNING = 4,
5379 #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
5380 MAV_SEVERITY_NOTICE = 5,
5381 #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
5382 MAV_SEVERITY_INFO = 6,
5383 #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
5384 MAV_SEVERITY_DEBUG = 7,
5385}
5386impl MavSeverity {
5387 pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
5388}
5389impl Default for MavSeverity {
5390 fn default() -> Self {
5391 Self::DEFAULT
5392 }
5393}
5394#[cfg_attr(feature = "ts", derive(TS))]
5395#[cfg_attr(feature = "ts", ts(export))]
5396#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5398#[cfg_attr(feature = "serde", serde(tag = "type"))]
5399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5400#[repr(u32)]
5401#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types. For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ. The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE. The current mode is streamed in CURRENT_MODE. See <https://mavlink.io/en/services/standard_modes.html>"]
5402pub enum MavStandardMode {
5403 #[doc = "Non standard mode. This may be used when reporting the mode if the current flight mode is not a standard mode."]
5404 MAV_STANDARD_MODE_NON_STANDARD = 0,
5405 #[doc = "Position mode (manual). Position-controlled and stabilized manual mode. When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces. This mode can only be set by vehicles that can hold a fixed position. Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces. Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles. Fixed-wing (FW) vehicles must not support this mode. Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5406 MAV_STANDARD_MODE_POSITION_HOLD = 1,
5407 #[doc = "Orbit (manual). Position-controlled and stabilized manual mode. The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction. Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated. Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters. MC and FW vehicles may support this mode. Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration. Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5408 MAV_STANDARD_MODE_ORBIT = 2,
5409 #[doc = "Cruise mode (manual). Position-controlled and stabilized manual mode. When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces. Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces. Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles. Multicopter (MC) vehicles must not support this mode. Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5410 MAV_STANDARD_MODE_CRUISE = 3,
5411 #[doc = "Altitude hold (manual). Altitude-controlled and stabilized manual mode. When sticks are released vehicles return to their level-flight orientation and hold their altitude. MC vehicles continue with existing momentum and may move with wind (or other external forces). FW vehicles continue with current heading, but may be moved off-track by wind. Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC). Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5412 MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
5413 #[doc = "Safe recovery mode (auto). Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle. This mode is more commonly referred to as RTL and/or or Smart RTL. The precise return location, flight path, and landing behaviour depend on vehicle configuration and type. For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
5414 MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
5415 #[doc = "Mission mode (automatic). Automatic mode that executes MAVLink missions. Missions are executed from the current waypoint as soon as the mode is enabled."]
5416 MAV_STANDARD_MODE_MISSION = 6,
5417 #[doc = "Land mode (auto). Automatic mode that lands the vehicle at the current location. The precise landing behaviour depends on vehicle configuration and type."]
5418 MAV_STANDARD_MODE_LAND = 7,
5419 #[doc = "Takeoff mode (auto). Automatic takeoff mode. The precise takeoff behaviour depends on vehicle configuration and type."]
5420 MAV_STANDARD_MODE_TAKEOFF = 8,
5421}
5422impl MavStandardMode {
5423 pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
5424}
5425impl Default for MavStandardMode {
5426 fn default() -> Self {
5427 Self::DEFAULT
5428 }
5429}
5430#[cfg_attr(feature = "ts", derive(TS))]
5431#[cfg_attr(feature = "ts", ts(export))]
5432#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5434#[cfg_attr(feature = "serde", serde(tag = "type"))]
5435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5436#[repr(u32)]
5437pub enum MavState {
5438 #[doc = "Uninitialized system, state is unknown."]
5439 MAV_STATE_UNINIT = 0,
5440 #[doc = "System is booting up."]
5441 MAV_STATE_BOOT = 1,
5442 #[doc = "System is calibrating and not flight-ready."]
5443 MAV_STATE_CALIBRATING = 2,
5444 #[doc = "System is grounded and on standby. It can be launched any time."]
5445 MAV_STATE_STANDBY = 3,
5446 #[doc = "System is active and might be already airborne. Motors are engaged."]
5447 MAV_STATE_ACTIVE = 4,
5448 #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
5449 MAV_STATE_CRITICAL = 5,
5450 #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
5451 MAV_STATE_EMERGENCY = 6,
5452 #[doc = "System just initialized its power-down sequence, will shut down now."]
5453 MAV_STATE_POWEROFF = 7,
5454 #[doc = "System is terminating itself (failsafe or commanded)."]
5455 MAV_STATE_FLIGHT_TERMINATION = 8,
5456}
5457impl MavState {
5458 pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
5459}
5460impl Default for MavState {
5461 fn default() -> Self {
5462 Self::DEFAULT
5463 }
5464}
5465bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
5466impl MavSysStatusSensor {
5467 pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
5468}
5469impl Default for MavSysStatusSensor {
5470 fn default() -> Self {
5471 Self::DEFAULT
5472 }
5473}
5474bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
5475impl MavSysStatusSensorExtended {
5476 pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
5477}
5478impl Default for MavSysStatusSensorExtended {
5479 fn default() -> Self {
5480 Self::DEFAULT
5481 }
5482}
5483#[cfg_attr(feature = "ts", derive(TS))]
5484#[cfg_attr(feature = "ts", ts(export))]
5485#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5487#[cfg_attr(feature = "serde", serde(tag = "type"))]
5488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5489#[repr(u32)]
5490pub enum MavTunnelPayloadType {
5491 #[doc = "Encoding of payload unknown."]
5492 MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
5493 #[doc = "Registered for STorM32 gimbal controller."]
5494 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
5495 #[doc = "Registered for STorM32 gimbal controller."]
5496 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
5497 #[doc = "Registered for STorM32 gimbal controller."]
5498 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
5499 #[doc = "Registered for STorM32 gimbal controller."]
5500 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
5501 #[doc = "Registered for STorM32 gimbal controller."]
5502 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
5503 #[doc = "Registered for STorM32 gimbal controller."]
5504 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
5505 #[doc = "Registered for STorM32 gimbal controller."]
5506 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
5507 #[doc = "Registered for STorM32 gimbal controller."]
5508 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
5509 #[doc = "Registered for STorM32 gimbal controller."]
5510 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
5511 #[doc = "Registered for STorM32 gimbal controller."]
5512 MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
5513 #[doc = "Registered for ModalAI remote OSD protocol."]
5514 MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
5515 #[doc = "Registered for ModalAI ESC UART passthru protocol."]
5516 MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
5517 #[doc = "Registered for ModalAI vendor use."]
5518 MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
5519}
5520impl MavTunnelPayloadType {
5521 pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
5522}
5523impl Default for MavTunnelPayloadType {
5524 fn default() -> Self {
5525 Self::DEFAULT
5526 }
5527}
5528#[cfg_attr(feature = "ts", derive(TS))]
5529#[cfg_attr(feature = "ts", ts(export))]
5530#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5532#[cfg_attr(feature = "serde", serde(tag = "type"))]
5533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5534#[repr(u32)]
5535#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
5536pub enum MavType {
5537 #[doc = "Generic micro air vehicle"]
5538 MAV_TYPE_GENERIC = 0,
5539 #[doc = "Fixed wing aircraft."]
5540 MAV_TYPE_FIXED_WING = 1,
5541 #[doc = "Quadrotor"]
5542 MAV_TYPE_QUADROTOR = 2,
5543 #[doc = "Coaxial helicopter"]
5544 MAV_TYPE_COAXIAL = 3,
5545 #[doc = "Normal helicopter with tail rotor."]
5546 MAV_TYPE_HELICOPTER = 4,
5547 #[doc = "Ground installation"]
5548 MAV_TYPE_ANTENNA_TRACKER = 5,
5549 #[doc = "Operator control unit / ground control station"]
5550 MAV_TYPE_GCS = 6,
5551 #[doc = "Airship, controlled"]
5552 MAV_TYPE_AIRSHIP = 7,
5553 #[doc = "Free balloon, uncontrolled"]
5554 MAV_TYPE_FREE_BALLOON = 8,
5555 #[doc = "Rocket"]
5556 MAV_TYPE_ROCKET = 9,
5557 #[doc = "Ground rover"]
5558 MAV_TYPE_GROUND_ROVER = 10,
5559 #[doc = "Surface vessel, boat, ship"]
5560 MAV_TYPE_SURFACE_BOAT = 11,
5561 #[doc = "Submarine"]
5562 MAV_TYPE_SUBMARINE = 12,
5563 #[doc = "Hexarotor"]
5564 MAV_TYPE_HEXAROTOR = 13,
5565 #[doc = "Octorotor"]
5566 MAV_TYPE_OCTOROTOR = 14,
5567 #[doc = "Tricopter"]
5568 MAV_TYPE_TRICOPTER = 15,
5569 #[doc = "Flapping wing"]
5570 MAV_TYPE_FLAPPING_WING = 16,
5571 #[doc = "Kite"]
5572 MAV_TYPE_KITE = 17,
5573 #[doc = "Onboard companion controller"]
5574 MAV_TYPE_ONBOARD_CONTROLLER = 18,
5575 #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
5576 MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
5577 #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
5578 MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
5579 #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
5580 MAV_TYPE_VTOL_TILTROTOR = 21,
5581 #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
5582 MAV_TYPE_VTOL_FIXEDROTOR = 22,
5583 #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
5584 MAV_TYPE_VTOL_TAILSITTER = 23,
5585 #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
5586 MAV_TYPE_VTOL_TILTWING = 24,
5587 #[doc = "VTOL reserved 5"]
5588 MAV_TYPE_VTOL_RESERVED5 = 25,
5589 #[doc = "Gimbal"]
5590 MAV_TYPE_GIMBAL = 26,
5591 #[doc = "ADSB system"]
5592 MAV_TYPE_ADSB = 27,
5593 #[doc = "Steerable, nonrigid airfoil"]
5594 MAV_TYPE_PARAFOIL = 28,
5595 #[doc = "Dodecarotor"]
5596 MAV_TYPE_DODECAROTOR = 29,
5597 #[doc = "Camera"]
5598 MAV_TYPE_CAMERA = 30,
5599 #[doc = "Charging station"]
5600 MAV_TYPE_CHARGING_STATION = 31,
5601 #[doc = "FLARM collision avoidance system"]
5602 MAV_TYPE_FLARM = 32,
5603 #[doc = "Servo"]
5604 MAV_TYPE_SERVO = 33,
5605 #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
5606 MAV_TYPE_ODID = 34,
5607 #[doc = "Decarotor"]
5608 MAV_TYPE_DECAROTOR = 35,
5609 #[doc = "Battery"]
5610 MAV_TYPE_BATTERY = 36,
5611 #[doc = "Parachute"]
5612 MAV_TYPE_PARACHUTE = 37,
5613 #[doc = "Log"]
5614 MAV_TYPE_LOG = 38,
5615 #[doc = "OSD"]
5616 MAV_TYPE_OSD = 39,
5617 #[doc = "IMU"]
5618 MAV_TYPE_IMU = 40,
5619 #[doc = "GPS"]
5620 MAV_TYPE_GPS = 41,
5621 #[doc = "Winch"]
5622 MAV_TYPE_WINCH = 42,
5623 #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
5624 MAV_TYPE_GENERIC_MULTIROTOR = 43,
5625 #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
5626 MAV_TYPE_ILLUMINATOR = 44,
5627 #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
5628 MAV_TYPE_SPACECRAFT_ORBITER = 45,
5629 #[doc = "A generic four-legged ground vehicle (e.g., a robot dog)."]
5630 MAV_TYPE_GROUND_QUADRUPED = 46,
5631 #[doc = "VTOL hybrid of helicopter and autogyro. It has a main rotor for lift and separate propellers for forward flight. The rotor must be powered for hover but can autorotate in cruise flight. See: <https://en.wikipedia.org/wiki/Gyrodyne>"]
5632 MAV_TYPE_VTOL_GYRODYNE = 47,
5633 #[doc = "Gripper"]
5634 MAV_TYPE_GRIPPER = 48,
5635 #[doc = "Radio"]
5636 MAV_TYPE_RADIO = 49,
5637}
5638impl MavType {
5639 pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
5640}
5641impl Default for MavType {
5642 fn default() -> Self {
5643 Self::DEFAULT
5644 }
5645}
5646#[cfg_attr(feature = "ts", derive(TS))]
5647#[cfg_attr(feature = "ts", ts(export))]
5648#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5650#[cfg_attr(feature = "serde", serde(tag = "type"))]
5651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5652#[repr(u32)]
5653#[doc = "Enumeration of VTOL states"]
5654pub enum MavVtolState {
5655 #[doc = "MAV is not configured as VTOL"]
5656 MAV_VTOL_STATE_UNDEFINED = 0,
5657 #[doc = "VTOL is in transition from multicopter to fixed-wing"]
5658 MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
5659 #[doc = "VTOL is in transition from fixed-wing to multicopter"]
5660 MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
5661 #[doc = "VTOL is in multicopter state"]
5662 MAV_VTOL_STATE_MC = 3,
5663 #[doc = "VTOL is in fixed-wing state"]
5664 MAV_VTOL_STATE_FW = 4,
5665}
5666impl MavVtolState {
5667 pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
5668}
5669impl Default for MavVtolState {
5670 fn default() -> Self {
5671 Self::DEFAULT
5672 }
5673}
5674bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
5675impl MavWinchStatusFlag {
5676 pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
5677}
5678impl Default for MavWinchStatusFlag {
5679 fn default() -> Self {
5680 Self::DEFAULT
5681 }
5682}
5683#[cfg_attr(feature = "ts", derive(TS))]
5684#[cfg_attr(feature = "ts", ts(export))]
5685#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5687#[cfg_attr(feature = "serde", serde(tag = "type"))]
5688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5689#[repr(u32)]
5690pub enum MavlinkDataStreamType {
5691 MAVLINK_DATA_STREAM_IMG_JPEG = 0,
5692 MAVLINK_DATA_STREAM_IMG_BMP = 1,
5693 MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
5694 MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
5695 MAVLINK_DATA_STREAM_IMG_PGM = 4,
5696 MAVLINK_DATA_STREAM_IMG_PNG = 5,
5697}
5698impl MavlinkDataStreamType {
5699 pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
5700}
5701impl Default for MavlinkDataStreamType {
5702 fn default() -> Self {
5703 Self::DEFAULT
5704 }
5705}
5706#[cfg_attr(feature = "ts", derive(TS))]
5707#[cfg_attr(feature = "ts", ts(export))]
5708#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5710#[cfg_attr(feature = "serde", serde(tag = "type"))]
5711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5712#[repr(u32)]
5713#[doc = "States of the mission state machine. Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended). They may not all be relevant on all vehicles."]
5714pub enum MissionState {
5715 #[doc = "The mission status reporting is not supported."]
5716 MISSION_STATE_UNKNOWN = 0,
5717 #[doc = "No mission on the vehicle."]
5718 MISSION_STATE_NO_MISSION = 1,
5719 #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
5720 MISSION_STATE_NOT_STARTED = 2,
5721 #[doc = "Mission is active, and will execute mission items when in auto mode."]
5722 MISSION_STATE_ACTIVE = 3,
5723 #[doc = "Mission is paused when in auto mode."]
5724 MISSION_STATE_PAUSED = 4,
5725 #[doc = "Mission has executed all mission items."]
5726 MISSION_STATE_COMPLETE = 5,
5727}
5728impl MissionState {
5729 pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
5730}
5731impl Default for MissionState {
5732 fn default() -> Self {
5733 Self::DEFAULT
5734 }
5735}
5736#[cfg_attr(feature = "ts", derive(TS))]
5737#[cfg_attr(feature = "ts", ts(export))]
5738#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5739#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5740#[cfg_attr(feature = "serde", serde(tag = "type"))]
5741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5742#[repr(u32)]
5743#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
5744pub enum MotorTestOrder {
5745 #[doc = "Default autopilot motor test method."]
5746 MOTOR_TEST_ORDER_DEFAULT = 0,
5747 #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
5748 MOTOR_TEST_ORDER_SEQUENCE = 1,
5749 #[doc = "Motor numbers are specified as the output as labeled on the board."]
5750 MOTOR_TEST_ORDER_BOARD = 2,
5751}
5752impl MotorTestOrder {
5753 pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
5754}
5755impl Default for MotorTestOrder {
5756 fn default() -> Self {
5757 Self::DEFAULT
5758 }
5759}
5760#[cfg_attr(feature = "ts", derive(TS))]
5761#[cfg_attr(feature = "ts", ts(export))]
5762#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5764#[cfg_attr(feature = "serde", serde(tag = "type"))]
5765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5766#[repr(u32)]
5767#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
5768pub enum MotorTestThrottleType {
5769 #[doc = "Throttle as a percentage (0 ~ 100)"]
5770 MOTOR_TEST_THROTTLE_PERCENT = 0,
5771 #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
5772 MOTOR_TEST_THROTTLE_PWM = 1,
5773 #[doc = "Throttle pass-through from pilot's transmitter."]
5774 MOTOR_TEST_THROTTLE_PILOT = 2,
5775 #[doc = "Per-motor compass calibration test."]
5776 MOTOR_TEST_COMPASS_CAL = 3,
5777}
5778impl MotorTestThrottleType {
5779 pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
5780}
5781impl Default for MotorTestThrottleType {
5782 fn default() -> Self {
5783 Self::DEFAULT
5784 }
5785}
5786#[cfg_attr(feature = "ts", derive(TS))]
5787#[cfg_attr(feature = "ts", ts(export))]
5788#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5790#[cfg_attr(feature = "serde", serde(tag = "type"))]
5791#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5792#[repr(u32)]
5793pub enum NavVtolLandOptions {
5794 #[doc = "Default autopilot landing behaviour."]
5795 NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
5796 #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground. The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
5797 NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
5798 #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
5799 NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
5800}
5801impl NavVtolLandOptions {
5802 pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
5803}
5804impl Default for NavVtolLandOptions {
5805 fn default() -> Self {
5806 Self::DEFAULT
5807 }
5808}
5809#[cfg_attr(feature = "ts", derive(TS))]
5810#[cfg_attr(feature = "ts", ts(export))]
5811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5813#[cfg_attr(feature = "serde", serde(tag = "type"))]
5814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5815#[repr(u32)]
5816#[doc = "Yaw behaviour during orbit flight."]
5817pub enum OrbitYawBehaviour {
5818 #[doc = "Vehicle front points to the center (default)."]
5819 ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
5820 #[doc = "Vehicle front holds heading when message received."]
5821 ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
5822 #[doc = "Yaw uncontrolled."]
5823 ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
5824 #[doc = "Vehicle front follows flight path (tangential to circle)."]
5825 ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
5826 #[doc = "Yaw controlled by RC input."]
5827 ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
5828 #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
5829 ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
5830}
5831impl OrbitYawBehaviour {
5832 pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
5833}
5834impl Default for OrbitYawBehaviour {
5835 fn default() -> Self {
5836 Self::DEFAULT
5837 }
5838}
5839#[cfg_attr(feature = "ts", derive(TS))]
5840#[cfg_attr(feature = "ts", ts(export))]
5841#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5843#[cfg_attr(feature = "serde", serde(tag = "type"))]
5844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5845#[repr(u32)]
5846#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
5847pub enum ParachuteAction {
5848 #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
5849 PARACHUTE_DISABLE = 0,
5850 #[doc = "Enable auto-release of parachute."]
5851 PARACHUTE_ENABLE = 1,
5852 #[doc = "Release parachute and kill motors."]
5853 PARACHUTE_RELEASE = 2,
5854}
5855impl ParachuteAction {
5856 pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
5857}
5858impl Default for ParachuteAction {
5859 fn default() -> Self {
5860 Self::DEFAULT
5861 }
5862}
5863#[cfg_attr(feature = "ts", derive(TS))]
5864#[cfg_attr(feature = "ts", ts(export))]
5865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5867#[cfg_attr(feature = "serde", serde(tag = "type"))]
5868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5869#[repr(u32)]
5870#[doc = "Result from PARAM_EXT_SET message."]
5871pub enum ParamAck {
5872 #[doc = "Parameter value ACCEPTED and SET"]
5873 PARAM_ACK_ACCEPTED = 0,
5874 #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
5875 PARAM_ACK_VALUE_UNSUPPORTED = 1,
5876 #[doc = "Parameter failed to set"]
5877 PARAM_ACK_FAILED = 2,
5878 #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
5879 PARAM_ACK_IN_PROGRESS = 3,
5880}
5881impl ParamAck {
5882 pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
5883}
5884impl Default for ParamAck {
5885 fn default() -> Self {
5886 Self::DEFAULT
5887 }
5888}
5889bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
5890impl PositionTargetTypemask {
5891 pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
5892}
5893impl Default for PositionTargetTypemask {
5894 fn default() -> Self {
5895 Self::DEFAULT
5896 }
5897}
5898#[cfg_attr(feature = "ts", derive(TS))]
5899#[cfg_attr(feature = "ts", ts(export))]
5900#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5902#[cfg_attr(feature = "serde", serde(tag = "type"))]
5903#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5904#[repr(u32)]
5905#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
5906pub enum PrecisionLandMode {
5907 #[doc = "Normal (non-precision) landing."]
5908 PRECISION_LAND_MODE_DISABLED = 0,
5909 #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
5910 PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
5911 #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
5912 PRECISION_LAND_MODE_REQUIRED = 2,
5913}
5914impl PrecisionLandMode {
5915 pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
5916}
5917impl Default for PrecisionLandMode {
5918 fn default() -> Self {
5919 Self::DEFAULT
5920 }
5921}
5922#[cfg_attr(feature = "ts", derive(TS))]
5923#[cfg_attr(feature = "ts", ts(export))]
5924#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5926#[cfg_attr(feature = "serde", serde(tag = "type"))]
5927#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5928#[repr(u32)]
5929#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE. (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
5930pub enum PreflightStorageMissionAction {
5931 #[doc = "Read current mission data from persistent storage"]
5932 MISSION_READ_PERSISTENT = 0,
5933 #[doc = "Write current mission data to persistent storage"]
5934 MISSION_WRITE_PERSISTENT = 1,
5935 #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
5936 MISSION_RESET_DEFAULT = 2,
5937}
5938impl PreflightStorageMissionAction {
5939 pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
5940}
5941impl Default for PreflightStorageMissionAction {
5942 fn default() -> Self {
5943 Self::DEFAULT
5944 }
5945}
5946#[cfg_attr(feature = "ts", derive(TS))]
5947#[cfg_attr(feature = "ts", ts(export))]
5948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5950#[cfg_attr(feature = "serde", serde(tag = "type"))]
5951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5952#[repr(u32)]
5953#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE. (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
5954pub enum PreflightStorageParameterAction {
5955 #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
5956 PARAM_READ_PERSISTENT = 0,
5957 #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
5958 PARAM_WRITE_PERSISTENT = 1,
5959 #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
5960 PARAM_RESET_CONFIG_DEFAULT = 2,
5961 #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
5962 PARAM_RESET_SENSOR_DEFAULT = 3,
5963 #[doc = "Reset all parameters, including operation counters, to default values"]
5964 PARAM_RESET_ALL_DEFAULT = 4,
5965}
5966impl PreflightStorageParameterAction {
5967 pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
5968}
5969impl Default for PreflightStorageParameterAction {
5970 fn default() -> Self {
5971 Self::DEFAULT
5972 }
5973}
5974#[cfg_attr(feature = "ts", derive(TS))]
5975#[cfg_attr(feature = "ts", ts(export))]
5976#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5978#[cfg_attr(feature = "serde", serde(tag = "type"))]
5979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5980#[repr(u32)]
5981#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
5982pub enum RcSubType {
5983 #[doc = "Spektrum DSM2"]
5984 RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
5985 #[doc = "Spektrum DSMX"]
5986 RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
5987 #[doc = "Spektrum DSMX8"]
5988 RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
5989}
5990impl RcSubType {
5991 pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
5992}
5993impl Default for RcSubType {
5994 fn default() -> Self {
5995 Self::DEFAULT
5996 }
5997}
5998#[cfg_attr(feature = "ts", derive(TS))]
5999#[cfg_attr(feature = "ts", ts(export))]
6000#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6001#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6002#[cfg_attr(feature = "serde", serde(tag = "type"))]
6003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6004#[repr(u32)]
6005#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
6006pub enum RcType {
6007 #[doc = "Spektrum"]
6008 RC_TYPE_SPEKTRUM = 0,
6009 #[doc = "CRSF"]
6010 RC_TYPE_CRSF = 1,
6011}
6012impl RcType {
6013 pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
6014}
6015impl Default for RcType {
6016 fn default() -> Self {
6017 Self::DEFAULT
6018 }
6019}
6020#[cfg_attr(feature = "ts", derive(TS))]
6021#[cfg_attr(feature = "ts", ts(export))]
6022#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6024#[cfg_attr(feature = "serde", serde(tag = "type"))]
6025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6026#[repr(u32)]
6027#[doc = "Reboot/shutdown action for selected component in MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN."]
6028pub enum RebootShutdownAction {
6029 #[doc = "Do nothing."]
6030 REBOOT_SHUTDOWN_ACTION_NONE = 0,
6031 #[doc = "Reboot component."]
6032 REBOOT_SHUTDOWN_ACTION_REBOOT = 1,
6033 #[doc = "Shutdown component."]
6034 REBOOT_SHUTDOWN_ACTION_SHUTDOWN = 2,
6035 #[doc = "Reboot component and keep it in the bootloader until upgraded."]
6036 REBOOT_SHUTDOWN_ACTION_REBOOT_TO_BOOTLOADER = 3,
6037 #[doc = "Power on component. Do nothing if component is already powered (ACK command with MAV_RESULT_ACCEPTED)."]
6038 REBOOT_SHUTDOWN_ACTION_POWER_ON = 4,
6039}
6040impl RebootShutdownAction {
6041 pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_ACTION_NONE;
6042}
6043impl Default for RebootShutdownAction {
6044 fn default() -> Self {
6045 Self::DEFAULT
6046 }
6047}
6048#[cfg_attr(feature = "ts", derive(TS))]
6049#[cfg_attr(feature = "ts", ts(export))]
6050#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6052#[cfg_attr(feature = "serde", serde(tag = "type"))]
6053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6054#[repr(u32)]
6055#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
6056pub enum RebootShutdownConditions {
6057 #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
6058 REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
6059 #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
6060 REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
6061}
6062impl RebootShutdownConditions {
6063 pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
6064}
6065impl Default for RebootShutdownConditions {
6066 fn default() -> Self {
6067 Self::DEFAULT
6068 }
6069}
6070#[cfg_attr(feature = "ts", derive(TS))]
6071#[cfg_attr(feature = "ts", ts(export))]
6072#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6074#[cfg_attr(feature = "serde", serde(tag = "type"))]
6075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6076#[repr(u32)]
6077#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
6078pub enum RtkBaselineCoordinateSystem {
6079 #[doc = "Earth-centered, Earth-fixed"]
6080 RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
6081 #[doc = "RTK basestation centered, north, east, down"]
6082 RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
6083}
6084impl RtkBaselineCoordinateSystem {
6085 pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
6086}
6087impl Default for RtkBaselineCoordinateSystem {
6088 fn default() -> Self {
6089 Self::DEFAULT
6090 }
6091}
6092#[cfg_attr(feature = "ts", derive(TS))]
6093#[cfg_attr(feature = "ts", ts(export))]
6094#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6095#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6096#[cfg_attr(feature = "serde", serde(tag = "type"))]
6097#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6098#[repr(u32)]
6099#[doc = "Possible safety switch states."]
6100pub enum SafetySwitchState {
6101 #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
6102 SAFETY_SWITCH_STATE_SAFE = 0,
6103 #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
6104 SAFETY_SWITCH_STATE_DANGEROUS = 1,
6105}
6106impl SafetySwitchState {
6107 pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
6108}
6109impl Default for SafetySwitchState {
6110 fn default() -> Self {
6111 Self::DEFAULT
6112 }
6113}
6114#[cfg_attr(feature = "ts", derive(TS))]
6115#[cfg_attr(feature = "ts", ts(export))]
6116#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6118#[cfg_attr(feature = "serde", serde(tag = "type"))]
6119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6120#[repr(u32)]
6121#[doc = "SERIAL_CONTROL device types"]
6122pub enum SerialControlDev {
6123 #[doc = "First telemetry port"]
6124 SERIAL_CONTROL_DEV_TELEM1 = 0,
6125 #[doc = "Second telemetry port"]
6126 SERIAL_CONTROL_DEV_TELEM2 = 1,
6127 #[doc = "First GPS port"]
6128 SERIAL_CONTROL_DEV_GPS1 = 2,
6129 #[doc = "Second GPS port"]
6130 SERIAL_CONTROL_DEV_GPS2 = 3,
6131 #[doc = "system shell"]
6132 SERIAL_CONTROL_DEV_SHELL = 10,
6133 #[doc = "SERIAL0"]
6134 SERIAL_CONTROL_SERIAL0 = 100,
6135 #[doc = "SERIAL1"]
6136 SERIAL_CONTROL_SERIAL1 = 101,
6137 #[doc = "SERIAL2"]
6138 SERIAL_CONTROL_SERIAL2 = 102,
6139 #[doc = "SERIAL3"]
6140 SERIAL_CONTROL_SERIAL3 = 103,
6141 #[doc = "SERIAL4"]
6142 SERIAL_CONTROL_SERIAL4 = 104,
6143 #[doc = "SERIAL5"]
6144 SERIAL_CONTROL_SERIAL5 = 105,
6145 #[doc = "SERIAL6"]
6146 SERIAL_CONTROL_SERIAL6 = 106,
6147 #[doc = "SERIAL7"]
6148 SERIAL_CONTROL_SERIAL7 = 107,
6149 #[doc = "SERIAL8"]
6150 SERIAL_CONTROL_SERIAL8 = 108,
6151 #[doc = "SERIAL9"]
6152 SERIAL_CONTROL_SERIAL9 = 109,
6153}
6154impl SerialControlDev {
6155 pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
6156}
6157impl Default for SerialControlDev {
6158 fn default() -> Self {
6159 Self::DEFAULT
6160 }
6161}
6162bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
6163impl SerialControlFlag {
6164 pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
6165}
6166impl Default for SerialControlFlag {
6167 fn default() -> Self {
6168 Self::DEFAULT
6169 }
6170}
6171#[cfg_attr(feature = "ts", derive(TS))]
6172#[cfg_attr(feature = "ts", ts(export))]
6173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6175#[cfg_attr(feature = "serde", serde(tag = "type"))]
6176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6177#[repr(u32)]
6178#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
6179pub enum SetFocusType {
6180 #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
6181 FOCUS_TYPE_STEP = 0,
6182 #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
6183 FOCUS_TYPE_CONTINUOUS = 1,
6184 #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
6185 FOCUS_TYPE_RANGE = 2,
6186 #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
6187 FOCUS_TYPE_METERS = 3,
6188 #[doc = "Focus automatically."]
6189 FOCUS_TYPE_AUTO = 4,
6190 #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
6191 FOCUS_TYPE_AUTO_SINGLE = 5,
6192 #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
6193 FOCUS_TYPE_AUTO_CONTINUOUS = 6,
6194}
6195impl SetFocusType {
6196 pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
6197}
6198impl Default for SetFocusType {
6199 fn default() -> Self {
6200 Self::DEFAULT
6201 }
6202}
6203#[cfg_attr(feature = "ts", derive(TS))]
6204#[cfg_attr(feature = "ts", ts(export))]
6205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6207#[cfg_attr(feature = "serde", serde(tag = "type"))]
6208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6209#[repr(u32)]
6210#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
6211pub enum SpeedType {
6212 #[doc = "Airspeed"]
6213 SPEED_TYPE_AIRSPEED = 0,
6214 #[doc = "Groundspeed"]
6215 SPEED_TYPE_GROUNDSPEED = 1,
6216 #[doc = "Climb speed"]
6217 SPEED_TYPE_CLIMB_SPEED = 2,
6218 #[doc = "Descent speed"]
6219 SPEED_TYPE_DESCENT_SPEED = 3,
6220}
6221impl SpeedType {
6222 pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
6223}
6224impl Default for SpeedType {
6225 fn default() -> Self {
6226 Self::DEFAULT
6227 }
6228}
6229#[cfg_attr(feature = "ts", derive(TS))]
6230#[cfg_attr(feature = "ts", ts(export))]
6231#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6233#[cfg_attr(feature = "serde", serde(tag = "type"))]
6234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6235#[repr(u32)]
6236#[doc = "Flags to indicate the status of camera storage."]
6237pub enum StorageStatus {
6238 #[doc = "Storage is missing (no microSD card loaded for example.)"]
6239 STORAGE_STATUS_EMPTY = 0,
6240 #[doc = "Storage present but unformatted."]
6241 STORAGE_STATUS_UNFORMATTED = 1,
6242 #[doc = "Storage present and ready."]
6243 STORAGE_STATUS_READY = 2,
6244 #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
6245 STORAGE_STATUS_NOT_SUPPORTED = 3,
6246}
6247impl StorageStatus {
6248 pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
6249}
6250impl Default for StorageStatus {
6251 fn default() -> Self {
6252 Self::DEFAULT
6253 }
6254}
6255#[cfg_attr(feature = "ts", derive(TS))]
6256#[cfg_attr(feature = "ts", ts(export))]
6257#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6259#[cfg_attr(feature = "serde", serde(tag = "type"))]
6260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6261#[repr(u32)]
6262#[doc = "Flags to indicate the type of storage."]
6263pub enum StorageType {
6264 #[doc = "Storage type is not known."]
6265 STORAGE_TYPE_UNKNOWN = 0,
6266 #[doc = "Storage type is USB device."]
6267 STORAGE_TYPE_USB_STICK = 1,
6268 #[doc = "Storage type is SD card."]
6269 STORAGE_TYPE_SD = 2,
6270 #[doc = "Storage type is microSD card."]
6271 STORAGE_TYPE_MICROSD = 3,
6272 #[doc = "Storage type is CFast."]
6273 STORAGE_TYPE_CF = 4,
6274 #[doc = "Storage type is CFexpress."]
6275 STORAGE_TYPE_CFE = 5,
6276 #[doc = "Storage type is XQD."]
6277 STORAGE_TYPE_XQD = 6,
6278 #[doc = "Storage type is HD mass storage type."]
6279 STORAGE_TYPE_HD = 7,
6280 #[doc = "Storage type is other, not listed type."]
6281 STORAGE_TYPE_OTHER = 254,
6282}
6283impl StorageType {
6284 pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
6285}
6286impl Default for StorageType {
6287 fn default() -> Self {
6288 Self::DEFAULT
6289 }
6290}
6291bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
6292impl StorageUsageFlag {
6293 pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
6294}
6295impl Default for StorageUsageFlag {
6296 fn default() -> Self {
6297 Self::DEFAULT
6298 }
6299}
6300#[cfg_attr(feature = "ts", derive(TS))]
6301#[cfg_attr(feature = "ts", ts(export))]
6302#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6304#[cfg_attr(feature = "serde", serde(tag = "type"))]
6305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6306#[repr(u32)]
6307#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
6308pub enum TuneFormat {
6309 #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
6310 TUNE_FORMAT_QBASIC1_1 = 1,
6311 #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
6312 TUNE_FORMAT_MML_MODERN = 2,
6313}
6314impl TuneFormat {
6315 pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
6316}
6317impl Default for TuneFormat {
6318 fn default() -> Self {
6319 Self::DEFAULT
6320 }
6321}
6322#[cfg_attr(feature = "ts", derive(TS))]
6323#[cfg_attr(feature = "ts", ts(export))]
6324#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6326#[cfg_attr(feature = "serde", serde(tag = "type"))]
6327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6328#[repr(u32)]
6329#[doc = "Generalized UAVCAN node health"]
6330pub enum UavcanNodeHealth {
6331 #[doc = "The node is functioning properly."]
6332 UAVCAN_NODE_HEALTH_OK = 0,
6333 #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
6334 UAVCAN_NODE_HEALTH_WARNING = 1,
6335 #[doc = "The node has encountered a major failure."]
6336 UAVCAN_NODE_HEALTH_ERROR = 2,
6337 #[doc = "The node has suffered a fatal malfunction."]
6338 UAVCAN_NODE_HEALTH_CRITICAL = 3,
6339}
6340impl UavcanNodeHealth {
6341 pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
6342}
6343impl Default for UavcanNodeHealth {
6344 fn default() -> Self {
6345 Self::DEFAULT
6346 }
6347}
6348#[cfg_attr(feature = "ts", derive(TS))]
6349#[cfg_attr(feature = "ts", ts(export))]
6350#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6352#[cfg_attr(feature = "serde", serde(tag = "type"))]
6353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6354#[repr(u32)]
6355#[doc = "Generalized UAVCAN node mode"]
6356pub enum UavcanNodeMode {
6357 #[doc = "The node is performing its primary functions."]
6358 UAVCAN_NODE_MODE_OPERATIONAL = 0,
6359 #[doc = "The node is initializing; this mode is entered immediately after startup."]
6360 UAVCAN_NODE_MODE_INITIALIZATION = 1,
6361 #[doc = "The node is under maintenance."]
6362 UAVCAN_NODE_MODE_MAINTENANCE = 2,
6363 #[doc = "The node is in the process of updating its software."]
6364 UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
6365 #[doc = "The node is no longer available online."]
6366 UAVCAN_NODE_MODE_OFFLINE = 7,
6367}
6368impl UavcanNodeMode {
6369 pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
6370}
6371impl Default for UavcanNodeMode {
6372 fn default() -> Self {
6373 Self::DEFAULT
6374 }
6375}
6376#[cfg_attr(feature = "ts", derive(TS))]
6377#[cfg_attr(feature = "ts", ts(export))]
6378#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6380#[cfg_attr(feature = "serde", serde(tag = "type"))]
6381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6382#[repr(u32)]
6383#[doc = "Emergency status encoding"]
6384pub enum UavionixAdsbEmergencyStatus {
6385 UAVIONIX_ADSB_OUT_NO_EMERGENCY = 0,
6386 UAVIONIX_ADSB_OUT_GENERAL_EMERGENCY = 1,
6387 UAVIONIX_ADSB_OUT_LIFEGUARD_EMERGENCY = 2,
6388 UAVIONIX_ADSB_OUT_MINIMUM_FUEL_EMERGENCY = 3,
6389 UAVIONIX_ADSB_OUT_NO_COMM_EMERGENCY = 4,
6390 UAVIONIX_ADSB_OUT_UNLAWFUL_INTERFERANCE_EMERGENCY = 5,
6391 UAVIONIX_ADSB_OUT_DOWNED_AIRCRAFT_EMERGENCY = 6,
6392 UAVIONIX_ADSB_OUT_RESERVED = 7,
6393}
6394impl UavionixAdsbEmergencyStatus {
6395 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_NO_EMERGENCY;
6396}
6397impl Default for UavionixAdsbEmergencyStatus {
6398 fn default() -> Self {
6399 Self::DEFAULT
6400 }
6401}
6402#[cfg_attr(feature = "ts", derive(TS))]
6403#[cfg_attr(feature = "ts", ts(export))]
6404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6406#[cfg_attr(feature = "serde", serde(tag = "type"))]
6407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6408#[repr(u32)]
6409#[doc = "Definitions for aircraft size"]
6410pub enum UavionixAdsbOutCfgAircraftSize {
6411 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA = 0,
6412 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L15M_W23M = 1,
6413 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25M_W28P5M = 2,
6414 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25_34M = 3,
6415 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_33M = 4,
6416 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_38M = 5,
6417 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_39P5M = 6,
6418 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_45M = 7,
6419 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_45M = 8,
6420 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_52M = 9,
6421 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_59P5M = 10,
6422 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_67M = 11,
6423 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W72P5M = 12,
6424 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W80M = 13,
6425 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W80M = 14,
6426 UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W90M = 15,
6427}
6428impl UavionixAdsbOutCfgAircraftSize {
6429 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA;
6430}
6431impl Default for UavionixAdsbOutCfgAircraftSize {
6432 fn default() -> Self {
6433 Self::DEFAULT
6434 }
6435}
6436#[cfg_attr(feature = "ts", derive(TS))]
6437#[cfg_attr(feature = "ts", ts(export))]
6438#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6440#[cfg_attr(feature = "serde", serde(tag = "type"))]
6441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6442#[repr(u32)]
6443#[doc = "GPS lataral offset encoding"]
6444pub enum UavionixAdsbOutCfgGpsOffsetLat {
6445 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA = 0,
6446 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_2M = 1,
6447 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_4M = 2,
6448 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_6M = 3,
6449 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_0M = 4,
6450 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_2M = 5,
6451 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_4M = 6,
6452 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_6M = 7,
6453}
6454impl UavionixAdsbOutCfgGpsOffsetLat {
6455 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA;
6456}
6457impl Default for UavionixAdsbOutCfgGpsOffsetLat {
6458 fn default() -> Self {
6459 Self::DEFAULT
6460 }
6461}
6462#[cfg_attr(feature = "ts", derive(TS))]
6463#[cfg_attr(feature = "ts", ts(export))]
6464#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6466#[cfg_attr(feature = "serde", serde(tag = "type"))]
6467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6468#[repr(u32)]
6469#[doc = "GPS longitudinal offset encoding"]
6470pub enum UavionixAdsbOutCfgGpsOffsetLon {
6471 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA = 0,
6472 UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_APPLIED_BY_SENSOR = 1,
6473}
6474impl UavionixAdsbOutCfgGpsOffsetLon {
6475 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA;
6476}
6477impl Default for UavionixAdsbOutCfgGpsOffsetLon {
6478 fn default() -> Self {
6479 Self::DEFAULT
6480 }
6481}
6482bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutControlState : u8 { const UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED = 1 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_ON_GROUND = 4 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_IDENT_BUTTON_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_1090ES_TX_ENABLED = 128 ; } }
6483impl UavionixAdsbOutControlState {
6484 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED;
6485}
6486impl Default for UavionixAdsbOutControlState {
6487 fn default() -> Self {
6488 Self::DEFAULT
6489 }
6490}
6491#[cfg_attr(feature = "ts", derive(TS))]
6492#[cfg_attr(feature = "ts", ts(export))]
6493#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6495#[cfg_attr(feature = "serde", serde(tag = "type"))]
6496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6497#[repr(u32)]
6498#[doc = "Status for ADS-B transponder dynamic input"]
6499pub enum UavionixAdsbOutDynamicGpsFix {
6500 UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0 = 0,
6501 UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_1 = 1,
6502 UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_2D = 2,
6503 UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_3D = 3,
6504 UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_DGPS = 4,
6505 UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_RTK = 5,
6506}
6507impl UavionixAdsbOutDynamicGpsFix {
6508 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0;
6509}
6510impl Default for UavionixAdsbOutDynamicGpsFix {
6511 fn default() -> Self {
6512 Self::DEFAULT
6513 }
6514}
6515bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutDynamicState : u16 { const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE = 1 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_AUTOPILOT_ENABLED = 2 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_NICBARO_CROSSCHECKED = 4 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_ON_GROUND = 8 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_IDENT = 16 ; } }
6516impl UavionixAdsbOutDynamicState {
6517 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE;
6518}
6519impl Default for UavionixAdsbOutDynamicState {
6520 fn default() -> Self {
6521 Self::DEFAULT
6522 }
6523}
6524bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Transceiver RF control flags for ADS-B transponder dynamic reports"] pub struct UavionixAdsbOutRfSelect : u8 { const UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED = 1 ; const UAVIONIX_ADSB_OUT_RF_SELECT_TX_ENABLED = 2 ; } }
6525impl UavionixAdsbOutRfSelect {
6526 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED;
6527}
6528impl Default for UavionixAdsbOutRfSelect {
6529 fn default() -> Self {
6530 Self::DEFAULT
6531 }
6532}
6533bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder fault report"] pub struct UavionixAdsbOutStatusFault : u8 { const UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL = 8 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_NO_POS = 16 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_UNAVAIL = 32 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_TX_SYSTEM_FAIL = 64 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_MAINT_REQ = 128 ; } }
6534impl UavionixAdsbOutStatusFault {
6535 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL;
6536}
6537impl Default for UavionixAdsbOutStatusFault {
6538 fn default() -> Self {
6539 Self::DEFAULT
6540 }
6541}
6542#[cfg_attr(feature = "ts", derive(TS))]
6543#[cfg_attr(feature = "ts", ts(export))]
6544#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6546#[cfg_attr(feature = "serde", serde(tag = "type"))]
6547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6548#[repr(u32)]
6549#[doc = "State flags for ADS-B transponder status report"]
6550pub enum UavionixAdsbOutStatusNicNacp {
6551 UAVIONIX_ADSB_NIC_CR_20_NM = 1,
6552 UAVIONIX_ADSB_NIC_CR_8_NM = 2,
6553 UAVIONIX_ADSB_NIC_CR_4_NM = 3,
6554 UAVIONIX_ADSB_NIC_CR_2_NM = 4,
6555 UAVIONIX_ADSB_NIC_CR_1_NM = 5,
6556 UAVIONIX_ADSB_NIC_CR_0_3_NM = 6,
6557 UAVIONIX_ADSB_NIC_CR_0_2_NM = 7,
6558 UAVIONIX_ADSB_NIC_CR_0_1_NM = 8,
6559 UAVIONIX_ADSB_NIC_CR_75_M = 9,
6560 UAVIONIX_ADSB_NIC_CR_25_M = 10,
6561 UAVIONIX_ADSB_NIC_CR_7_5_M = 11,
6562 UAVIONIX_ADSB_NACP_EPU_10_NM = 16,
6563 UAVIONIX_ADSB_NACP_EPU_4_NM = 32,
6564 UAVIONIX_ADSB_NACP_EPU_2_NM = 48,
6565 UAVIONIX_ADSB_NACP_EPU_1_NM = 64,
6566 UAVIONIX_ADSB_NACP_EPU_0_5_NM = 80,
6567 UAVIONIX_ADSB_NACP_EPU_0_3_NM = 96,
6568 UAVIONIX_ADSB_NACP_EPU_0_1_NM = 112,
6569 UAVIONIX_ADSB_NACP_EPU_0_05_NM = 128,
6570 UAVIONIX_ADSB_NACP_EPU_30_M = 144,
6571 UAVIONIX_ADSB_NACP_EPU_10_M = 160,
6572 UAVIONIX_ADSB_NACP_EPU_3_M = 176,
6573}
6574impl UavionixAdsbOutStatusNicNacp {
6575 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_NIC_CR_20_NM;
6576}
6577impl Default for UavionixAdsbOutStatusNicNacp {
6578 fn default() -> Self {
6579 Self::DEFAULT
6580 }
6581}
6582bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder status report"] pub struct UavionixAdsbOutStatusState : u8 { const UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND = 1 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_INTERROGATED_SINCE_LAST = 2 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_XBIT_ENABLED = 4 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_IDENT_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_1090ES_TX_ENABLED = 128 ; } }
6583impl UavionixAdsbOutStatusState {
6584 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND;
6585}
6586impl Default for UavionixAdsbOutStatusState {
6587 fn default() -> Self {
6588 Self::DEFAULT
6589 }
6590}
6591bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Status flags for ADS-B transponder dynamic output"] pub struct UavionixAdsbRfHealth : u8 { const UAVIONIX_ADSB_RF_HEALTH_OK = 1 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_TX = 2 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_RX = 16 ; } }
6592impl UavionixAdsbRfHealth {
6593 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_RF_HEALTH_OK;
6594}
6595impl Default for UavionixAdsbRfHealth {
6596 fn default() -> Self {
6597 Self::DEFAULT
6598 }
6599}
6600bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for X-Bit and reserved fields."] pub struct UavionixAdsbXbit : u8 { const UAVIONIX_ADSB_XBIT_ENABLED = 128 ; } }
6601impl UavionixAdsbXbit {
6602 pub const DEFAULT: Self = Self::UAVIONIX_ADSB_XBIT_ENABLED;
6603}
6604impl Default for UavionixAdsbXbit {
6605 fn default() -> Self {
6606 Self::DEFAULT
6607 }
6608}
6609bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
6610impl UtmDataAvailFlags {
6611 pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
6612}
6613impl Default for UtmDataAvailFlags {
6614 fn default() -> Self {
6615 Self::DEFAULT
6616 }
6617}
6618#[cfg_attr(feature = "ts", derive(TS))]
6619#[cfg_attr(feature = "ts", ts(export))]
6620#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6622#[cfg_attr(feature = "serde", serde(tag = "type"))]
6623#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6624#[repr(u32)]
6625#[doc = "Airborne status of UAS."]
6626pub enum UtmFlightState {
6627 #[doc = "The flight state can't be determined."]
6628 UTM_FLIGHT_STATE_UNKNOWN = 1,
6629 #[doc = "UAS on ground."]
6630 UTM_FLIGHT_STATE_GROUND = 2,
6631 #[doc = "UAS airborne."]
6632 UTM_FLIGHT_STATE_AIRBORNE = 3,
6633 #[doc = "UAS is in an emergency flight state."]
6634 UTM_FLIGHT_STATE_EMERGENCY = 16,
6635 #[doc = "UAS has no active controls."]
6636 UTM_FLIGHT_STATE_NOCTRL = 32,
6637}
6638impl UtmFlightState {
6639 pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
6640}
6641impl Default for UtmFlightState {
6642 fn default() -> Self {
6643 Self::DEFAULT
6644 }
6645}
6646#[cfg_attr(feature = "ts", derive(TS))]
6647#[cfg_attr(feature = "ts", ts(export))]
6648#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6650#[cfg_attr(feature = "serde", serde(tag = "type"))]
6651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6652#[repr(u32)]
6653#[doc = "Video stream encodings"]
6654pub enum VideoStreamEncoding {
6655 #[doc = "Stream encoding is unknown"]
6656 VIDEO_STREAM_ENCODING_UNKNOWN = 0,
6657 #[doc = "Stream encoding is H.264"]
6658 VIDEO_STREAM_ENCODING_H264 = 1,
6659 #[doc = "Stream encoding is H.265"]
6660 VIDEO_STREAM_ENCODING_H265 = 2,
6661}
6662impl VideoStreamEncoding {
6663 pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
6664}
6665impl Default for VideoStreamEncoding {
6666 fn default() -> Self {
6667 Self::DEFAULT
6668 }
6669}
6670bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
6671impl VideoStreamStatusFlags {
6672 pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
6673}
6674impl Default for VideoStreamStatusFlags {
6675 fn default() -> Self {
6676 Self::DEFAULT
6677 }
6678}
6679#[cfg_attr(feature = "ts", derive(TS))]
6680#[cfg_attr(feature = "ts", ts(export))]
6681#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6683#[cfg_attr(feature = "serde", serde(tag = "type"))]
6684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6685#[repr(u32)]
6686#[doc = "Video stream types"]
6687pub enum VideoStreamType {
6688 #[doc = "Stream is RTSP"]
6689 VIDEO_STREAM_TYPE_RTSP = 0,
6690 #[doc = "Stream is RTP UDP (URI gives the port number)"]
6691 VIDEO_STREAM_TYPE_RTPUDP = 1,
6692 #[doc = "Stream is MPEG on TCP"]
6693 VIDEO_STREAM_TYPE_TCP_MPEG = 2,
6694 #[doc = "Stream is MPEG TS (URI gives the port number)"]
6695 VIDEO_STREAM_TYPE_MPEG_TS = 3,
6696}
6697impl VideoStreamType {
6698 pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
6699}
6700impl Default for VideoStreamType {
6701 fn default() -> Self {
6702 Self::DEFAULT
6703 }
6704}
6705#[cfg_attr(feature = "ts", derive(TS))]
6706#[cfg_attr(feature = "ts", ts(export))]
6707#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6709#[cfg_attr(feature = "serde", serde(tag = "type"))]
6710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6711#[repr(u32)]
6712#[doc = "Direction of VTOL transition"]
6713pub enum VtolTransitionHeading {
6714 #[doc = "Respect the heading configuration of the vehicle."]
6715 VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
6716 #[doc = "Use the heading pointing towards the next waypoint."]
6717 VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
6718 #[doc = "Use the heading on takeoff (while sitting on the ground)."]
6719 VTOL_TRANSITION_HEADING_TAKEOFF = 2,
6720 #[doc = "Use the specified heading in parameter 4."]
6721 VTOL_TRANSITION_HEADING_SPECIFIED = 3,
6722 #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
6723 VTOL_TRANSITION_HEADING_ANY = 4,
6724}
6725impl VtolTransitionHeading {
6726 pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
6727}
6728impl Default for VtolTransitionHeading {
6729 fn default() -> Self {
6730 Self::DEFAULT
6731 }
6732}
6733#[cfg_attr(feature = "ts", derive(TS))]
6734#[cfg_attr(feature = "ts", ts(export))]
6735#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6737#[cfg_attr(feature = "serde", serde(tag = "type"))]
6738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6739#[repr(u32)]
6740#[doc = "WiFi Mode."]
6741pub enum WifiConfigApMode {
6742 #[doc = "WiFi mode is undefined."]
6743 WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
6744 #[doc = "WiFi configured as an access point."]
6745 WIFI_CONFIG_AP_MODE_AP = 1,
6746 #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
6747 WIFI_CONFIG_AP_MODE_STATION = 2,
6748 #[doc = "WiFi disabled."]
6749 WIFI_CONFIG_AP_MODE_DISABLED = 3,
6750}
6751impl WifiConfigApMode {
6752 pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
6753}
6754impl Default for WifiConfigApMode {
6755 fn default() -> Self {
6756 Self::DEFAULT
6757 }
6758}
6759#[cfg_attr(feature = "ts", derive(TS))]
6760#[cfg_attr(feature = "ts", ts(export))]
6761#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6763#[cfg_attr(feature = "serde", serde(tag = "type"))]
6764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6765#[repr(u32)]
6766#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
6767pub enum WifiConfigApResponse {
6768 #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
6769 WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
6770 #[doc = "Changes accepted."]
6771 WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
6772 #[doc = "Changes rejected."]
6773 WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
6774 #[doc = "Invalid Mode."]
6775 WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
6776 #[doc = "Invalid SSID."]
6777 WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
6778 #[doc = "Invalid Password."]
6779 WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
6780}
6781impl WifiConfigApResponse {
6782 pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
6783}
6784impl Default for WifiConfigApResponse {
6785 fn default() -> Self {
6786 Self::DEFAULT
6787 }
6788}
6789#[cfg_attr(feature = "ts", derive(TS))]
6790#[cfg_attr(feature = "ts", ts(export))]
6791#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6793#[cfg_attr(feature = "serde", serde(tag = "type"))]
6794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6795#[repr(u32)]
6796#[doc = "Winch actions."]
6797pub enum WinchActions {
6798 #[doc = "Allow motor to freewheel."]
6799 WINCH_RELAXED = 0,
6800 #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
6801 WINCH_RELATIVE_LENGTH_CONTROL = 1,
6802 #[doc = "Wind or unwind line at specified rate."]
6803 WINCH_RATE_CONTROL = 2,
6804 #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
6805 WINCH_LOCK = 3,
6806 #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
6807 WINCH_DELIVER = 4,
6808 #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
6809 WINCH_HOLD = 5,
6810 #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
6811 WINCH_RETRACT = 6,
6812 #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
6813 WINCH_LOAD_LINE = 7,
6814 #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
6815 WINCH_ABANDON_LINE = 8,
6816 #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
6817 WINCH_LOAD_PAYLOAD = 9,
6818}
6819impl WinchActions {
6820 pub const DEFAULT: Self = Self::WINCH_RELAXED;
6821}
6822impl Default for WinchActions {
6823 fn default() -> Self {
6824 Self::DEFAULT
6825 }
6826}
6827#[doc = "Set the vehicle attitude and body angular rates."]
6828#[doc = ""]
6829#[doc = "ID: 140"]
6830#[derive(Debug, Clone, PartialEq)]
6831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6833#[cfg_attr(feature = "ts", derive(TS))]
6834#[cfg_attr(feature = "ts", ts(export))]
6835pub struct ACTUATOR_CONTROL_TARGET_DATA {
6836 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6837 pub time_usec: u64,
6838 #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
6839 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6840 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6841 pub controls: [f32; 8],
6842 #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
6843 pub group_mlx: u8,
6844}
6845impl ACTUATOR_CONTROL_TARGET_DATA {
6846 pub const ENCODED_LEN: usize = 41usize;
6847 pub const DEFAULT: Self = Self {
6848 time_usec: 0_u64,
6849 controls: [0.0_f32; 8usize],
6850 group_mlx: 0_u8,
6851 };
6852 #[cfg(feature = "arbitrary")]
6853 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6854 use arbitrary::{Arbitrary, Unstructured};
6855 let mut buf = [0u8; 1024];
6856 rng.fill_bytes(&mut buf);
6857 let mut unstructured = Unstructured::new(&buf);
6858 Self::arbitrary(&mut unstructured).unwrap_or_default()
6859 }
6860}
6861impl Default for ACTUATOR_CONTROL_TARGET_DATA {
6862 fn default() -> Self {
6863 Self::DEFAULT.clone()
6864 }
6865}
6866impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
6867 type Message = MavMessage;
6868 const ID: u32 = 140u32;
6869 const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
6870 const EXTRA_CRC: u8 = 181u8;
6871 const ENCODED_LEN: usize = 41usize;
6872 fn deser(
6873 _version: MavlinkVersion,
6874 __input: &[u8],
6875 ) -> Result<Self, ::mavlink_core::error::ParserError> {
6876 let avail_len = __input.len();
6877 let mut payload_buf = [0; Self::ENCODED_LEN];
6878 let mut buf = if avail_len < Self::ENCODED_LEN {
6879 payload_buf[0..avail_len].copy_from_slice(__input);
6880 Bytes::new(&payload_buf)
6881 } else {
6882 Bytes::new(__input)
6883 };
6884 let mut __struct = Self::default();
6885 __struct.time_usec = buf.get_u64_le()?;
6886 for v in &mut __struct.controls {
6887 let val = buf.get_f32_le()?;
6888 *v = val;
6889 }
6890 __struct.group_mlx = buf.get_u8()?;
6891 Ok(__struct)
6892 }
6893 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6894 let mut __tmp = BytesMut::new(bytes);
6895 #[allow(clippy::absurd_extreme_comparisons)]
6896 #[allow(unused_comparisons)]
6897 if __tmp.remaining() < Self::ENCODED_LEN {
6898 panic!(
6899 "buffer is too small (need {} bytes, but got {})",
6900 Self::ENCODED_LEN,
6901 __tmp.remaining(),
6902 )
6903 }
6904 __tmp.put_u64_le(self.time_usec);
6905 for val in &self.controls {
6906 __tmp.put_f32_le(*val);
6907 }
6908 __tmp.put_u8(self.group_mlx);
6909 if matches!(version, MavlinkVersion::V2) {
6910 let len = __tmp.len();
6911 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6912 } else {
6913 __tmp.len()
6914 }
6915 }
6916}
6917#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
6918#[doc = ""]
6919#[doc = "ID: 375"]
6920#[derive(Debug, Clone, PartialEq)]
6921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6923#[cfg_attr(feature = "ts", derive(TS))]
6924#[cfg_attr(feature = "ts", ts(export))]
6925pub struct ACTUATOR_OUTPUT_STATUS_DATA {
6926 #[doc = "Timestamp (since system boot)."]
6927 pub time_usec: u64,
6928 #[doc = "Active outputs"]
6929 pub active: u32,
6930 #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
6931 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6932 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6933 pub actuator: [f32; 32],
6934}
6935impl ACTUATOR_OUTPUT_STATUS_DATA {
6936 pub const ENCODED_LEN: usize = 140usize;
6937 pub const DEFAULT: Self = Self {
6938 time_usec: 0_u64,
6939 active: 0_u32,
6940 actuator: [0.0_f32; 32usize],
6941 };
6942 #[cfg(feature = "arbitrary")]
6943 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6944 use arbitrary::{Arbitrary, Unstructured};
6945 let mut buf = [0u8; 1024];
6946 rng.fill_bytes(&mut buf);
6947 let mut unstructured = Unstructured::new(&buf);
6948 Self::arbitrary(&mut unstructured).unwrap_or_default()
6949 }
6950}
6951impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
6952 fn default() -> Self {
6953 Self::DEFAULT.clone()
6954 }
6955}
6956impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
6957 type Message = MavMessage;
6958 const ID: u32 = 375u32;
6959 const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
6960 const EXTRA_CRC: u8 = 251u8;
6961 const ENCODED_LEN: usize = 140usize;
6962 fn deser(
6963 _version: MavlinkVersion,
6964 __input: &[u8],
6965 ) -> Result<Self, ::mavlink_core::error::ParserError> {
6966 let avail_len = __input.len();
6967 let mut payload_buf = [0; Self::ENCODED_LEN];
6968 let mut buf = if avail_len < Self::ENCODED_LEN {
6969 payload_buf[0..avail_len].copy_from_slice(__input);
6970 Bytes::new(&payload_buf)
6971 } else {
6972 Bytes::new(__input)
6973 };
6974 let mut __struct = Self::default();
6975 __struct.time_usec = buf.get_u64_le()?;
6976 __struct.active = buf.get_u32_le()?;
6977 for v in &mut __struct.actuator {
6978 let val = buf.get_f32_le()?;
6979 *v = val;
6980 }
6981 Ok(__struct)
6982 }
6983 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6984 let mut __tmp = BytesMut::new(bytes);
6985 #[allow(clippy::absurd_extreme_comparisons)]
6986 #[allow(unused_comparisons)]
6987 if __tmp.remaining() < Self::ENCODED_LEN {
6988 panic!(
6989 "buffer is too small (need {} bytes, but got {})",
6990 Self::ENCODED_LEN,
6991 __tmp.remaining(),
6992 )
6993 }
6994 __tmp.put_u64_le(self.time_usec);
6995 __tmp.put_u32_le(self.active);
6996 for val in &self.actuator {
6997 __tmp.put_f32_le(*val);
6998 }
6999 if matches!(version, MavlinkVersion::V2) {
7000 let len = __tmp.len();
7001 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7002 } else {
7003 __tmp.len()
7004 }
7005 }
7006}
7007#[doc = "The location and information of an ADSB vehicle."]
7008#[doc = ""]
7009#[doc = "ID: 246"]
7010#[derive(Debug, Clone, PartialEq)]
7011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7013#[cfg_attr(feature = "ts", derive(TS))]
7014#[cfg_attr(feature = "ts", ts(export))]
7015pub struct ADSB_VEHICLE_DATA {
7016 #[doc = "ICAO address"]
7017 pub ICAO_address: u32,
7018 #[doc = "Latitude"]
7019 pub lat: i32,
7020 #[doc = "Longitude"]
7021 pub lon: i32,
7022 #[doc = "Altitude(ASL)"]
7023 pub altitude: i32,
7024 #[doc = "Course over ground"]
7025 pub heading: u16,
7026 #[doc = "The horizontal velocity"]
7027 pub hor_velocity: u16,
7028 #[doc = "The vertical velocity. Positive is up"]
7029 pub ver_velocity: i16,
7030 #[doc = "Bitmap to indicate various statuses including valid data fields"]
7031 pub flags: AdsbFlags,
7032 #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
7033 pub squawk: u16,
7034 #[doc = "ADSB altitude type."]
7035 pub altitude_type: AdsbAltitudeType,
7036 #[doc = "The callsign, 8+null"]
7037 #[cfg_attr(feature = "ts", ts(type = "string"))]
7038 pub callsign: CharArray<9>,
7039 #[doc = "ADSB emitter type."]
7040 pub emitter_type: AdsbEmitterType,
7041 #[doc = "Time since last communication in seconds"]
7042 pub tslc: u8,
7043}
7044impl ADSB_VEHICLE_DATA {
7045 pub const ENCODED_LEN: usize = 38usize;
7046 pub const DEFAULT: Self = Self {
7047 ICAO_address: 0_u32,
7048 lat: 0_i32,
7049 lon: 0_i32,
7050 altitude: 0_i32,
7051 heading: 0_u16,
7052 hor_velocity: 0_u16,
7053 ver_velocity: 0_i16,
7054 flags: AdsbFlags::DEFAULT,
7055 squawk: 0_u16,
7056 altitude_type: AdsbAltitudeType::DEFAULT,
7057 callsign: CharArray::new([0_u8; 9usize]),
7058 emitter_type: AdsbEmitterType::DEFAULT,
7059 tslc: 0_u8,
7060 };
7061 #[cfg(feature = "arbitrary")]
7062 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7063 use arbitrary::{Arbitrary, Unstructured};
7064 let mut buf = [0u8; 1024];
7065 rng.fill_bytes(&mut buf);
7066 let mut unstructured = Unstructured::new(&buf);
7067 Self::arbitrary(&mut unstructured).unwrap_or_default()
7068 }
7069}
7070impl Default for ADSB_VEHICLE_DATA {
7071 fn default() -> Self {
7072 Self::DEFAULT.clone()
7073 }
7074}
7075impl MessageData for ADSB_VEHICLE_DATA {
7076 type Message = MavMessage;
7077 const ID: u32 = 246u32;
7078 const NAME: &'static str = "ADSB_VEHICLE";
7079 const EXTRA_CRC: u8 = 184u8;
7080 const ENCODED_LEN: usize = 38usize;
7081 fn deser(
7082 _version: MavlinkVersion,
7083 __input: &[u8],
7084 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7085 let avail_len = __input.len();
7086 let mut payload_buf = [0; Self::ENCODED_LEN];
7087 let mut buf = if avail_len < Self::ENCODED_LEN {
7088 payload_buf[0..avail_len].copy_from_slice(__input);
7089 Bytes::new(&payload_buf)
7090 } else {
7091 Bytes::new(__input)
7092 };
7093 let mut __struct = Self::default();
7094 __struct.ICAO_address = buf.get_u32_le()?;
7095 __struct.lat = buf.get_i32_le()?;
7096 __struct.lon = buf.get_i32_le()?;
7097 __struct.altitude = buf.get_i32_le()?;
7098 __struct.heading = buf.get_u16_le()?;
7099 __struct.hor_velocity = buf.get_u16_le()?;
7100 __struct.ver_velocity = buf.get_i16_le()?;
7101 let tmp = buf.get_u16_le()?;
7102 __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
7103 ::mavlink_core::error::ParserError::InvalidFlag {
7104 flag_type: "AdsbFlags",
7105 value: tmp as u64,
7106 },
7107 )?;
7108 __struct.squawk = buf.get_u16_le()?;
7109 let tmp = buf.get_u8()?;
7110 __struct.altitude_type =
7111 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7112 enum_type: "AdsbAltitudeType",
7113 value: tmp as u64,
7114 })?;
7115 let mut tmp = [0_u8; 9usize];
7116 for v in &mut tmp {
7117 *v = buf.get_u8()?;
7118 }
7119 __struct.callsign = CharArray::new(tmp);
7120 let tmp = buf.get_u8()?;
7121 __struct.emitter_type =
7122 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7123 enum_type: "AdsbEmitterType",
7124 value: tmp as u64,
7125 })?;
7126 __struct.tslc = buf.get_u8()?;
7127 Ok(__struct)
7128 }
7129 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7130 let mut __tmp = BytesMut::new(bytes);
7131 #[allow(clippy::absurd_extreme_comparisons)]
7132 #[allow(unused_comparisons)]
7133 if __tmp.remaining() < Self::ENCODED_LEN {
7134 panic!(
7135 "buffer is too small (need {} bytes, but got {})",
7136 Self::ENCODED_LEN,
7137 __tmp.remaining(),
7138 )
7139 }
7140 __tmp.put_u32_le(self.ICAO_address);
7141 __tmp.put_i32_le(self.lat);
7142 __tmp.put_i32_le(self.lon);
7143 __tmp.put_i32_le(self.altitude);
7144 __tmp.put_u16_le(self.heading);
7145 __tmp.put_u16_le(self.hor_velocity);
7146 __tmp.put_i16_le(self.ver_velocity);
7147 __tmp.put_u16_le(self.flags.bits() as u16);
7148 __tmp.put_u16_le(self.squawk);
7149 __tmp.put_u8(self.altitude_type as u8);
7150 for val in &self.callsign {
7151 __tmp.put_u8(*val);
7152 }
7153 __tmp.put_u8(self.emitter_type as u8);
7154 __tmp.put_u8(self.tslc);
7155 if matches!(version, MavlinkVersion::V2) {
7156 let len = __tmp.len();
7157 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7158 } else {
7159 __tmp.len()
7160 }
7161 }
7162}
7163#[doc = "Airspeed information from a sensor."]
7164#[doc = ""]
7165#[doc = "ID: 295"]
7166#[derive(Debug, Clone, PartialEq)]
7167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7169#[cfg_attr(feature = "ts", derive(TS))]
7170#[cfg_attr(feature = "ts", ts(export))]
7171pub struct AIRSPEED_DATA {
7172 #[doc = "Calibrated airspeed (CAS)."]
7173 pub airspeed: f32,
7174 #[doc = "Raw differential pressure."]
7175 pub raw_press: f32,
7176 #[doc = "Temperature."]
7177 pub temperature: i16,
7178 #[doc = "Sensor ID."]
7179 pub id: u8,
7180 #[doc = "Airspeed sensor flags."]
7181 pub flags: AirspeedSensorFlags,
7182}
7183impl AIRSPEED_DATA {
7184 pub const ENCODED_LEN: usize = 12usize;
7185 pub const DEFAULT: Self = Self {
7186 airspeed: 0.0_f32,
7187 raw_press: 0.0_f32,
7188 temperature: 0_i16,
7189 id: 0_u8,
7190 flags: AirspeedSensorFlags::DEFAULT,
7191 };
7192 #[cfg(feature = "arbitrary")]
7193 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7194 use arbitrary::{Arbitrary, Unstructured};
7195 let mut buf = [0u8; 1024];
7196 rng.fill_bytes(&mut buf);
7197 let mut unstructured = Unstructured::new(&buf);
7198 Self::arbitrary(&mut unstructured).unwrap_or_default()
7199 }
7200}
7201impl Default for AIRSPEED_DATA {
7202 fn default() -> Self {
7203 Self::DEFAULT.clone()
7204 }
7205}
7206impl MessageData for AIRSPEED_DATA {
7207 type Message = MavMessage;
7208 const ID: u32 = 295u32;
7209 const NAME: &'static str = "AIRSPEED";
7210 const EXTRA_CRC: u8 = 234u8;
7211 const ENCODED_LEN: usize = 12usize;
7212 fn deser(
7213 _version: MavlinkVersion,
7214 __input: &[u8],
7215 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7216 let avail_len = __input.len();
7217 let mut payload_buf = [0; Self::ENCODED_LEN];
7218 let mut buf = if avail_len < Self::ENCODED_LEN {
7219 payload_buf[0..avail_len].copy_from_slice(__input);
7220 Bytes::new(&payload_buf)
7221 } else {
7222 Bytes::new(__input)
7223 };
7224 let mut __struct = Self::default();
7225 __struct.airspeed = buf.get_f32_le()?;
7226 __struct.raw_press = buf.get_f32_le()?;
7227 __struct.temperature = buf.get_i16_le()?;
7228 __struct.id = buf.get_u8()?;
7229 let tmp = buf.get_u8()?;
7230 __struct.flags = AirspeedSensorFlags::from_bits(
7231 tmp as <AirspeedSensorFlags as Flags>::Bits,
7232 )
7233 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7234 flag_type: "AirspeedSensorFlags",
7235 value: tmp as u64,
7236 })?;
7237 Ok(__struct)
7238 }
7239 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7240 let mut __tmp = BytesMut::new(bytes);
7241 #[allow(clippy::absurd_extreme_comparisons)]
7242 #[allow(unused_comparisons)]
7243 if __tmp.remaining() < Self::ENCODED_LEN {
7244 panic!(
7245 "buffer is too small (need {} bytes, but got {})",
7246 Self::ENCODED_LEN,
7247 __tmp.remaining(),
7248 )
7249 }
7250 __tmp.put_f32_le(self.airspeed);
7251 __tmp.put_f32_le(self.raw_press);
7252 __tmp.put_i16_le(self.temperature);
7253 __tmp.put_u8(self.id);
7254 __tmp.put_u8(self.flags.bits() as u8);
7255 if matches!(version, MavlinkVersion::V2) {
7256 let len = __tmp.len();
7257 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7258 } else {
7259 __tmp.len()
7260 }
7261 }
7262}
7263#[doc = "The location and information of an AIS vessel."]
7264#[doc = ""]
7265#[doc = "ID: 301"]
7266#[derive(Debug, Clone, PartialEq)]
7267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7269#[cfg_attr(feature = "ts", derive(TS))]
7270#[cfg_attr(feature = "ts", ts(export))]
7271pub struct AIS_VESSEL_DATA {
7272 #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
7273 pub MMSI: u32,
7274 #[doc = "Latitude"]
7275 pub lat: i32,
7276 #[doc = "Longitude"]
7277 pub lon: i32,
7278 #[doc = "Course over ground"]
7279 pub COG: u16,
7280 #[doc = "True heading"]
7281 pub heading: u16,
7282 #[doc = "Speed over ground"]
7283 pub velocity: u16,
7284 #[doc = "Distance from lat/lon location to bow"]
7285 pub dimension_bow: u16,
7286 #[doc = "Distance from lat/lon location to stern"]
7287 pub dimension_stern: u16,
7288 #[doc = "Time since last communication in seconds"]
7289 pub tslc: u16,
7290 #[doc = "Bitmask to indicate various statuses including valid data fields"]
7291 pub flags: AisFlags,
7292 #[doc = "Turn rate, 0.1 degrees per second"]
7293 pub turn_rate: i8,
7294 #[doc = "Navigational status"]
7295 pub navigational_status: AisNavStatus,
7296 #[doc = "Type of vessels"]
7297 pub mavtype: AisType,
7298 #[doc = "Distance from lat/lon location to port side"]
7299 pub dimension_port: u8,
7300 #[doc = "Distance from lat/lon location to starboard side"]
7301 pub dimension_starboard: u8,
7302 #[doc = "The vessel callsign"]
7303 #[cfg_attr(feature = "ts", ts(type = "string"))]
7304 pub callsign: CharArray<7>,
7305 #[doc = "The vessel name"]
7306 #[cfg_attr(feature = "ts", ts(type = "string"))]
7307 pub name: CharArray<20>,
7308}
7309impl AIS_VESSEL_DATA {
7310 pub const ENCODED_LEN: usize = 58usize;
7311 pub const DEFAULT: Self = Self {
7312 MMSI: 0_u32,
7313 lat: 0_i32,
7314 lon: 0_i32,
7315 COG: 0_u16,
7316 heading: 0_u16,
7317 velocity: 0_u16,
7318 dimension_bow: 0_u16,
7319 dimension_stern: 0_u16,
7320 tslc: 0_u16,
7321 flags: AisFlags::DEFAULT,
7322 turn_rate: 0_i8,
7323 navigational_status: AisNavStatus::DEFAULT,
7324 mavtype: AisType::DEFAULT,
7325 dimension_port: 0_u8,
7326 dimension_starboard: 0_u8,
7327 callsign: CharArray::new([0_u8; 7usize]),
7328 name: CharArray::new([0_u8; 20usize]),
7329 };
7330 #[cfg(feature = "arbitrary")]
7331 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7332 use arbitrary::{Arbitrary, Unstructured};
7333 let mut buf = [0u8; 1024];
7334 rng.fill_bytes(&mut buf);
7335 let mut unstructured = Unstructured::new(&buf);
7336 Self::arbitrary(&mut unstructured).unwrap_or_default()
7337 }
7338}
7339impl Default for AIS_VESSEL_DATA {
7340 fn default() -> Self {
7341 Self::DEFAULT.clone()
7342 }
7343}
7344impl MessageData for AIS_VESSEL_DATA {
7345 type Message = MavMessage;
7346 const ID: u32 = 301u32;
7347 const NAME: &'static str = "AIS_VESSEL";
7348 const EXTRA_CRC: u8 = 243u8;
7349 const ENCODED_LEN: usize = 58usize;
7350 fn deser(
7351 _version: MavlinkVersion,
7352 __input: &[u8],
7353 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7354 let avail_len = __input.len();
7355 let mut payload_buf = [0; Self::ENCODED_LEN];
7356 let mut buf = if avail_len < Self::ENCODED_LEN {
7357 payload_buf[0..avail_len].copy_from_slice(__input);
7358 Bytes::new(&payload_buf)
7359 } else {
7360 Bytes::new(__input)
7361 };
7362 let mut __struct = Self::default();
7363 __struct.MMSI = buf.get_u32_le()?;
7364 __struct.lat = buf.get_i32_le()?;
7365 __struct.lon = buf.get_i32_le()?;
7366 __struct.COG = buf.get_u16_le()?;
7367 __struct.heading = buf.get_u16_le()?;
7368 __struct.velocity = buf.get_u16_le()?;
7369 __struct.dimension_bow = buf.get_u16_le()?;
7370 __struct.dimension_stern = buf.get_u16_le()?;
7371 __struct.tslc = buf.get_u16_le()?;
7372 let tmp = buf.get_u16_le()?;
7373 __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
7374 ::mavlink_core::error::ParserError::InvalidFlag {
7375 flag_type: "AisFlags",
7376 value: tmp as u64,
7377 },
7378 )?;
7379 __struct.turn_rate = buf.get_i8()?;
7380 let tmp = buf.get_u8()?;
7381 __struct.navigational_status =
7382 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7383 enum_type: "AisNavStatus",
7384 value: tmp as u64,
7385 })?;
7386 let tmp = buf.get_u8()?;
7387 __struct.mavtype =
7388 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7389 enum_type: "AisType",
7390 value: tmp as u64,
7391 })?;
7392 __struct.dimension_port = buf.get_u8()?;
7393 __struct.dimension_starboard = buf.get_u8()?;
7394 let mut tmp = [0_u8; 7usize];
7395 for v in &mut tmp {
7396 *v = buf.get_u8()?;
7397 }
7398 __struct.callsign = CharArray::new(tmp);
7399 let mut tmp = [0_u8; 20usize];
7400 for v in &mut tmp {
7401 *v = buf.get_u8()?;
7402 }
7403 __struct.name = CharArray::new(tmp);
7404 Ok(__struct)
7405 }
7406 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7407 let mut __tmp = BytesMut::new(bytes);
7408 #[allow(clippy::absurd_extreme_comparisons)]
7409 #[allow(unused_comparisons)]
7410 if __tmp.remaining() < Self::ENCODED_LEN {
7411 panic!(
7412 "buffer is too small (need {} bytes, but got {})",
7413 Self::ENCODED_LEN,
7414 __tmp.remaining(),
7415 )
7416 }
7417 __tmp.put_u32_le(self.MMSI);
7418 __tmp.put_i32_le(self.lat);
7419 __tmp.put_i32_le(self.lon);
7420 __tmp.put_u16_le(self.COG);
7421 __tmp.put_u16_le(self.heading);
7422 __tmp.put_u16_le(self.velocity);
7423 __tmp.put_u16_le(self.dimension_bow);
7424 __tmp.put_u16_le(self.dimension_stern);
7425 __tmp.put_u16_le(self.tslc);
7426 __tmp.put_u16_le(self.flags.bits() as u16);
7427 __tmp.put_i8(self.turn_rate);
7428 __tmp.put_u8(self.navigational_status as u8);
7429 __tmp.put_u8(self.mavtype as u8);
7430 __tmp.put_u8(self.dimension_port);
7431 __tmp.put_u8(self.dimension_starboard);
7432 for val in &self.callsign {
7433 __tmp.put_u8(*val);
7434 }
7435 for val in &self.name {
7436 __tmp.put_u8(*val);
7437 }
7438 if matches!(version, MavlinkVersion::V2) {
7439 let len = __tmp.len();
7440 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7441 } else {
7442 __tmp.len()
7443 }
7444 }
7445}
7446#[doc = "The current system altitude."]
7447#[doc = ""]
7448#[doc = "ID: 141"]
7449#[derive(Debug, Clone, PartialEq)]
7450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7452#[cfg_attr(feature = "ts", derive(TS))]
7453#[cfg_attr(feature = "ts", ts(export))]
7454pub struct ALTITUDE_DATA {
7455 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7456 pub time_usec: u64,
7457 #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
7458 pub altitude_monotonic: f32,
7459 #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
7460 pub altitude_amsl: f32,
7461 #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
7462 pub altitude_local: f32,
7463 #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
7464 pub altitude_relative: f32,
7465 #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
7466 pub altitude_terrain: f32,
7467 #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
7468 pub bottom_clearance: f32,
7469}
7470impl ALTITUDE_DATA {
7471 pub const ENCODED_LEN: usize = 32usize;
7472 pub const DEFAULT: Self = Self {
7473 time_usec: 0_u64,
7474 altitude_monotonic: 0.0_f32,
7475 altitude_amsl: 0.0_f32,
7476 altitude_local: 0.0_f32,
7477 altitude_relative: 0.0_f32,
7478 altitude_terrain: 0.0_f32,
7479 bottom_clearance: 0.0_f32,
7480 };
7481 #[cfg(feature = "arbitrary")]
7482 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7483 use arbitrary::{Arbitrary, Unstructured};
7484 let mut buf = [0u8; 1024];
7485 rng.fill_bytes(&mut buf);
7486 let mut unstructured = Unstructured::new(&buf);
7487 Self::arbitrary(&mut unstructured).unwrap_or_default()
7488 }
7489}
7490impl Default for ALTITUDE_DATA {
7491 fn default() -> Self {
7492 Self::DEFAULT.clone()
7493 }
7494}
7495impl MessageData for ALTITUDE_DATA {
7496 type Message = MavMessage;
7497 const ID: u32 = 141u32;
7498 const NAME: &'static str = "ALTITUDE";
7499 const EXTRA_CRC: u8 = 47u8;
7500 const ENCODED_LEN: usize = 32usize;
7501 fn deser(
7502 _version: MavlinkVersion,
7503 __input: &[u8],
7504 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7505 let avail_len = __input.len();
7506 let mut payload_buf = [0; Self::ENCODED_LEN];
7507 let mut buf = if avail_len < Self::ENCODED_LEN {
7508 payload_buf[0..avail_len].copy_from_slice(__input);
7509 Bytes::new(&payload_buf)
7510 } else {
7511 Bytes::new(__input)
7512 };
7513 let mut __struct = Self::default();
7514 __struct.time_usec = buf.get_u64_le()?;
7515 __struct.altitude_monotonic = buf.get_f32_le()?;
7516 __struct.altitude_amsl = buf.get_f32_le()?;
7517 __struct.altitude_local = buf.get_f32_le()?;
7518 __struct.altitude_relative = buf.get_f32_le()?;
7519 __struct.altitude_terrain = buf.get_f32_le()?;
7520 __struct.bottom_clearance = buf.get_f32_le()?;
7521 Ok(__struct)
7522 }
7523 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7524 let mut __tmp = BytesMut::new(bytes);
7525 #[allow(clippy::absurd_extreme_comparisons)]
7526 #[allow(unused_comparisons)]
7527 if __tmp.remaining() < Self::ENCODED_LEN {
7528 panic!(
7529 "buffer is too small (need {} bytes, but got {})",
7530 Self::ENCODED_LEN,
7531 __tmp.remaining(),
7532 )
7533 }
7534 __tmp.put_u64_le(self.time_usec);
7535 __tmp.put_f32_le(self.altitude_monotonic);
7536 __tmp.put_f32_le(self.altitude_amsl);
7537 __tmp.put_f32_le(self.altitude_local);
7538 __tmp.put_f32_le(self.altitude_relative);
7539 __tmp.put_f32_le(self.altitude_terrain);
7540 __tmp.put_f32_le(self.bottom_clearance);
7541 if matches!(version, MavlinkVersion::V2) {
7542 let len = __tmp.len();
7543 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7544 } else {
7545 __tmp.len()
7546 }
7547 }
7548}
7549#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
7550#[doc = ""]
7551#[doc = "ID: 30"]
7552#[derive(Debug, Clone, PartialEq)]
7553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7555#[cfg_attr(feature = "ts", derive(TS))]
7556#[cfg_attr(feature = "ts", ts(export))]
7557pub struct ATTITUDE_DATA {
7558 #[doc = "Timestamp (time since system boot)."]
7559 pub time_boot_ms: u32,
7560 #[doc = "Roll angle (-pi..+pi)"]
7561 pub roll: f32,
7562 #[doc = "Pitch angle (-pi..+pi)"]
7563 pub pitch: f32,
7564 #[doc = "Yaw angle (-pi..+pi)"]
7565 pub yaw: f32,
7566 #[doc = "Roll angular speed"]
7567 pub rollspeed: f32,
7568 #[doc = "Pitch angular speed"]
7569 pub pitchspeed: f32,
7570 #[doc = "Yaw angular speed"]
7571 pub yawspeed: f32,
7572}
7573impl ATTITUDE_DATA {
7574 pub const ENCODED_LEN: usize = 28usize;
7575 pub const DEFAULT: Self = Self {
7576 time_boot_ms: 0_u32,
7577 roll: 0.0_f32,
7578 pitch: 0.0_f32,
7579 yaw: 0.0_f32,
7580 rollspeed: 0.0_f32,
7581 pitchspeed: 0.0_f32,
7582 yawspeed: 0.0_f32,
7583 };
7584 #[cfg(feature = "arbitrary")]
7585 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7586 use arbitrary::{Arbitrary, Unstructured};
7587 let mut buf = [0u8; 1024];
7588 rng.fill_bytes(&mut buf);
7589 let mut unstructured = Unstructured::new(&buf);
7590 Self::arbitrary(&mut unstructured).unwrap_or_default()
7591 }
7592}
7593impl Default for ATTITUDE_DATA {
7594 fn default() -> Self {
7595 Self::DEFAULT.clone()
7596 }
7597}
7598impl MessageData for ATTITUDE_DATA {
7599 type Message = MavMessage;
7600 const ID: u32 = 30u32;
7601 const NAME: &'static str = "ATTITUDE";
7602 const EXTRA_CRC: u8 = 39u8;
7603 const ENCODED_LEN: usize = 28usize;
7604 fn deser(
7605 _version: MavlinkVersion,
7606 __input: &[u8],
7607 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7608 let avail_len = __input.len();
7609 let mut payload_buf = [0; Self::ENCODED_LEN];
7610 let mut buf = if avail_len < Self::ENCODED_LEN {
7611 payload_buf[0..avail_len].copy_from_slice(__input);
7612 Bytes::new(&payload_buf)
7613 } else {
7614 Bytes::new(__input)
7615 };
7616 let mut __struct = Self::default();
7617 __struct.time_boot_ms = buf.get_u32_le()?;
7618 __struct.roll = buf.get_f32_le()?;
7619 __struct.pitch = buf.get_f32_le()?;
7620 __struct.yaw = buf.get_f32_le()?;
7621 __struct.rollspeed = buf.get_f32_le()?;
7622 __struct.pitchspeed = buf.get_f32_le()?;
7623 __struct.yawspeed = buf.get_f32_le()?;
7624 Ok(__struct)
7625 }
7626 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7627 let mut __tmp = BytesMut::new(bytes);
7628 #[allow(clippy::absurd_extreme_comparisons)]
7629 #[allow(unused_comparisons)]
7630 if __tmp.remaining() < Self::ENCODED_LEN {
7631 panic!(
7632 "buffer is too small (need {} bytes, but got {})",
7633 Self::ENCODED_LEN,
7634 __tmp.remaining(),
7635 )
7636 }
7637 __tmp.put_u32_le(self.time_boot_ms);
7638 __tmp.put_f32_le(self.roll);
7639 __tmp.put_f32_le(self.pitch);
7640 __tmp.put_f32_le(self.yaw);
7641 __tmp.put_f32_le(self.rollspeed);
7642 __tmp.put_f32_le(self.pitchspeed);
7643 __tmp.put_f32_le(self.yawspeed);
7644 if matches!(version, MavlinkVersion::V2) {
7645 let len = __tmp.len();
7646 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7647 } else {
7648 __tmp.len()
7649 }
7650 }
7651}
7652#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
7653#[doc = ""]
7654#[doc = "ID: 31"]
7655#[derive(Debug, Clone, PartialEq)]
7656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7658#[cfg_attr(feature = "ts", derive(TS))]
7659#[cfg_attr(feature = "ts", ts(export))]
7660pub struct ATTITUDE_QUATERNION_DATA {
7661 #[doc = "Timestamp (time since system boot)."]
7662 pub time_boot_ms: u32,
7663 #[doc = "Quaternion component 1, w (1 in null-rotation)"]
7664 pub q1: f32,
7665 #[doc = "Quaternion component 2, x (0 in null-rotation)"]
7666 pub q2: f32,
7667 #[doc = "Quaternion component 3, y (0 in null-rotation)"]
7668 pub q3: f32,
7669 #[doc = "Quaternion component 4, z (0 in null-rotation)"]
7670 pub q4: f32,
7671 #[doc = "Roll angular speed"]
7672 pub rollspeed: f32,
7673 #[doc = "Pitch angular speed"]
7674 pub pitchspeed: f32,
7675 #[doc = "Yaw angular speed"]
7676 pub yawspeed: f32,
7677 #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
7678 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7679 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7680 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7681 pub repr_offset_q: [f32; 4],
7682}
7683impl ATTITUDE_QUATERNION_DATA {
7684 pub const ENCODED_LEN: usize = 48usize;
7685 pub const DEFAULT: Self = Self {
7686 time_boot_ms: 0_u32,
7687 q1: 0.0_f32,
7688 q2: 0.0_f32,
7689 q3: 0.0_f32,
7690 q4: 0.0_f32,
7691 rollspeed: 0.0_f32,
7692 pitchspeed: 0.0_f32,
7693 yawspeed: 0.0_f32,
7694 repr_offset_q: [0.0_f32; 4usize],
7695 };
7696 #[cfg(feature = "arbitrary")]
7697 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7698 use arbitrary::{Arbitrary, Unstructured};
7699 let mut buf = [0u8; 1024];
7700 rng.fill_bytes(&mut buf);
7701 let mut unstructured = Unstructured::new(&buf);
7702 Self::arbitrary(&mut unstructured).unwrap_or_default()
7703 }
7704}
7705impl Default for ATTITUDE_QUATERNION_DATA {
7706 fn default() -> Self {
7707 Self::DEFAULT.clone()
7708 }
7709}
7710impl MessageData for ATTITUDE_QUATERNION_DATA {
7711 type Message = MavMessage;
7712 const ID: u32 = 31u32;
7713 const NAME: &'static str = "ATTITUDE_QUATERNION";
7714 const EXTRA_CRC: u8 = 246u8;
7715 const ENCODED_LEN: usize = 48usize;
7716 fn deser(
7717 _version: MavlinkVersion,
7718 __input: &[u8],
7719 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7720 let avail_len = __input.len();
7721 let mut payload_buf = [0; Self::ENCODED_LEN];
7722 let mut buf = if avail_len < Self::ENCODED_LEN {
7723 payload_buf[0..avail_len].copy_from_slice(__input);
7724 Bytes::new(&payload_buf)
7725 } else {
7726 Bytes::new(__input)
7727 };
7728 let mut __struct = Self::default();
7729 __struct.time_boot_ms = buf.get_u32_le()?;
7730 __struct.q1 = buf.get_f32_le()?;
7731 __struct.q2 = buf.get_f32_le()?;
7732 __struct.q3 = buf.get_f32_le()?;
7733 __struct.q4 = buf.get_f32_le()?;
7734 __struct.rollspeed = buf.get_f32_le()?;
7735 __struct.pitchspeed = buf.get_f32_le()?;
7736 __struct.yawspeed = buf.get_f32_le()?;
7737 for v in &mut __struct.repr_offset_q {
7738 let val = buf.get_f32_le()?;
7739 *v = val;
7740 }
7741 Ok(__struct)
7742 }
7743 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7744 let mut __tmp = BytesMut::new(bytes);
7745 #[allow(clippy::absurd_extreme_comparisons)]
7746 #[allow(unused_comparisons)]
7747 if __tmp.remaining() < Self::ENCODED_LEN {
7748 panic!(
7749 "buffer is too small (need {} bytes, but got {})",
7750 Self::ENCODED_LEN,
7751 __tmp.remaining(),
7752 )
7753 }
7754 __tmp.put_u32_le(self.time_boot_ms);
7755 __tmp.put_f32_le(self.q1);
7756 __tmp.put_f32_le(self.q2);
7757 __tmp.put_f32_le(self.q3);
7758 __tmp.put_f32_le(self.q4);
7759 __tmp.put_f32_le(self.rollspeed);
7760 __tmp.put_f32_le(self.pitchspeed);
7761 __tmp.put_f32_le(self.yawspeed);
7762 if matches!(version, MavlinkVersion::V2) {
7763 for val in &self.repr_offset_q {
7764 __tmp.put_f32_le(*val);
7765 }
7766 let len = __tmp.len();
7767 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7768 } else {
7769 __tmp.len()
7770 }
7771 }
7772}
7773#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
7774#[doc = ""]
7775#[doc = "ID: 61"]
7776#[derive(Debug, Clone, PartialEq)]
7777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7779#[cfg_attr(feature = "ts", derive(TS))]
7780#[cfg_attr(feature = "ts", ts(export))]
7781pub struct ATTITUDE_QUATERNION_COV_DATA {
7782 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7783 pub time_usec: u64,
7784 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
7785 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7786 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7787 pub q: [f32; 4],
7788 #[doc = "Roll angular speed"]
7789 pub rollspeed: f32,
7790 #[doc = "Pitch angular speed"]
7791 pub pitchspeed: f32,
7792 #[doc = "Yaw angular speed"]
7793 pub yawspeed: f32,
7794 #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
7795 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7796 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7797 pub covariance: [f32; 9],
7798}
7799impl ATTITUDE_QUATERNION_COV_DATA {
7800 pub const ENCODED_LEN: usize = 72usize;
7801 pub const DEFAULT: Self = Self {
7802 time_usec: 0_u64,
7803 q: [0.0_f32; 4usize],
7804 rollspeed: 0.0_f32,
7805 pitchspeed: 0.0_f32,
7806 yawspeed: 0.0_f32,
7807 covariance: [0.0_f32; 9usize],
7808 };
7809 #[cfg(feature = "arbitrary")]
7810 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7811 use arbitrary::{Arbitrary, Unstructured};
7812 let mut buf = [0u8; 1024];
7813 rng.fill_bytes(&mut buf);
7814 let mut unstructured = Unstructured::new(&buf);
7815 Self::arbitrary(&mut unstructured).unwrap_or_default()
7816 }
7817}
7818impl Default for ATTITUDE_QUATERNION_COV_DATA {
7819 fn default() -> Self {
7820 Self::DEFAULT.clone()
7821 }
7822}
7823impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
7824 type Message = MavMessage;
7825 const ID: u32 = 61u32;
7826 const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
7827 const EXTRA_CRC: u8 = 167u8;
7828 const ENCODED_LEN: usize = 72usize;
7829 fn deser(
7830 _version: MavlinkVersion,
7831 __input: &[u8],
7832 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7833 let avail_len = __input.len();
7834 let mut payload_buf = [0; Self::ENCODED_LEN];
7835 let mut buf = if avail_len < Self::ENCODED_LEN {
7836 payload_buf[0..avail_len].copy_from_slice(__input);
7837 Bytes::new(&payload_buf)
7838 } else {
7839 Bytes::new(__input)
7840 };
7841 let mut __struct = Self::default();
7842 __struct.time_usec = buf.get_u64_le()?;
7843 for v in &mut __struct.q {
7844 let val = buf.get_f32_le()?;
7845 *v = val;
7846 }
7847 __struct.rollspeed = buf.get_f32_le()?;
7848 __struct.pitchspeed = buf.get_f32_le()?;
7849 __struct.yawspeed = buf.get_f32_le()?;
7850 for v in &mut __struct.covariance {
7851 let val = buf.get_f32_le()?;
7852 *v = val;
7853 }
7854 Ok(__struct)
7855 }
7856 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7857 let mut __tmp = BytesMut::new(bytes);
7858 #[allow(clippy::absurd_extreme_comparisons)]
7859 #[allow(unused_comparisons)]
7860 if __tmp.remaining() < Self::ENCODED_LEN {
7861 panic!(
7862 "buffer is too small (need {} bytes, but got {})",
7863 Self::ENCODED_LEN,
7864 __tmp.remaining(),
7865 )
7866 }
7867 __tmp.put_u64_le(self.time_usec);
7868 for val in &self.q {
7869 __tmp.put_f32_le(*val);
7870 }
7871 __tmp.put_f32_le(self.rollspeed);
7872 __tmp.put_f32_le(self.pitchspeed);
7873 __tmp.put_f32_le(self.yawspeed);
7874 for val in &self.covariance {
7875 __tmp.put_f32_le(*val);
7876 }
7877 if matches!(version, MavlinkVersion::V2) {
7878 let len = __tmp.len();
7879 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7880 } else {
7881 __tmp.len()
7882 }
7883 }
7884}
7885#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
7886#[doc = ""]
7887#[doc = "ID: 83"]
7888#[derive(Debug, Clone, PartialEq)]
7889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7891#[cfg_attr(feature = "ts", derive(TS))]
7892#[cfg_attr(feature = "ts", ts(export))]
7893pub struct ATTITUDE_TARGET_DATA {
7894 #[doc = "Timestamp (time since system boot)."]
7895 pub time_boot_ms: u32,
7896 #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7897 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7898 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7899 pub q: [f32; 4],
7900 #[doc = "Body roll rate"]
7901 pub body_roll_rate: f32,
7902 #[doc = "Body pitch rate"]
7903 pub body_pitch_rate: f32,
7904 #[doc = "Body yaw rate"]
7905 pub body_yaw_rate: f32,
7906 #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
7907 pub thrust: f32,
7908 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
7909 pub type_mask: AttitudeTargetTypemask,
7910}
7911impl ATTITUDE_TARGET_DATA {
7912 pub const ENCODED_LEN: usize = 37usize;
7913 pub const DEFAULT: Self = Self {
7914 time_boot_ms: 0_u32,
7915 q: [0.0_f32; 4usize],
7916 body_roll_rate: 0.0_f32,
7917 body_pitch_rate: 0.0_f32,
7918 body_yaw_rate: 0.0_f32,
7919 thrust: 0.0_f32,
7920 type_mask: AttitudeTargetTypemask::DEFAULT,
7921 };
7922 #[cfg(feature = "arbitrary")]
7923 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7924 use arbitrary::{Arbitrary, Unstructured};
7925 let mut buf = [0u8; 1024];
7926 rng.fill_bytes(&mut buf);
7927 let mut unstructured = Unstructured::new(&buf);
7928 Self::arbitrary(&mut unstructured).unwrap_or_default()
7929 }
7930}
7931impl Default for ATTITUDE_TARGET_DATA {
7932 fn default() -> Self {
7933 Self::DEFAULT.clone()
7934 }
7935}
7936impl MessageData for ATTITUDE_TARGET_DATA {
7937 type Message = MavMessage;
7938 const ID: u32 = 83u32;
7939 const NAME: &'static str = "ATTITUDE_TARGET";
7940 const EXTRA_CRC: u8 = 22u8;
7941 const ENCODED_LEN: usize = 37usize;
7942 fn deser(
7943 _version: MavlinkVersion,
7944 __input: &[u8],
7945 ) -> Result<Self, ::mavlink_core::error::ParserError> {
7946 let avail_len = __input.len();
7947 let mut payload_buf = [0; Self::ENCODED_LEN];
7948 let mut buf = if avail_len < Self::ENCODED_LEN {
7949 payload_buf[0..avail_len].copy_from_slice(__input);
7950 Bytes::new(&payload_buf)
7951 } else {
7952 Bytes::new(__input)
7953 };
7954 let mut __struct = Self::default();
7955 __struct.time_boot_ms = buf.get_u32_le()?;
7956 for v in &mut __struct.q {
7957 let val = buf.get_f32_le()?;
7958 *v = val;
7959 }
7960 __struct.body_roll_rate = buf.get_f32_le()?;
7961 __struct.body_pitch_rate = buf.get_f32_le()?;
7962 __struct.body_yaw_rate = buf.get_f32_le()?;
7963 __struct.thrust = buf.get_f32_le()?;
7964 let tmp = buf.get_u8()?;
7965 __struct.type_mask =
7966 AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
7967 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7968 flag_type: "AttitudeTargetTypemask",
7969 value: tmp as u64,
7970 })?;
7971 Ok(__struct)
7972 }
7973 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7974 let mut __tmp = BytesMut::new(bytes);
7975 #[allow(clippy::absurd_extreme_comparisons)]
7976 #[allow(unused_comparisons)]
7977 if __tmp.remaining() < Self::ENCODED_LEN {
7978 panic!(
7979 "buffer is too small (need {} bytes, but got {})",
7980 Self::ENCODED_LEN,
7981 __tmp.remaining(),
7982 )
7983 }
7984 __tmp.put_u32_le(self.time_boot_ms);
7985 for val in &self.q {
7986 __tmp.put_f32_le(*val);
7987 }
7988 __tmp.put_f32_le(self.body_roll_rate);
7989 __tmp.put_f32_le(self.body_pitch_rate);
7990 __tmp.put_f32_le(self.body_yaw_rate);
7991 __tmp.put_f32_le(self.thrust);
7992 __tmp.put_u8(self.type_mask.bits() as u8);
7993 if matches!(version, MavlinkVersion::V2) {
7994 let len = __tmp.len();
7995 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7996 } else {
7997 __tmp.len()
7998 }
7999 }
8000}
8001#[doc = "Motion capture attitude and position."]
8002#[doc = ""]
8003#[doc = "ID: 138"]
8004#[derive(Debug, Clone, PartialEq)]
8005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8007#[cfg_attr(feature = "ts", derive(TS))]
8008#[cfg_attr(feature = "ts", ts(export))]
8009pub struct ATT_POS_MOCAP_DATA {
8010 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8011 pub time_usec: u64,
8012 #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
8013 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8014 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8015 pub q: [f32; 4],
8016 #[doc = "X position (NED)"]
8017 pub x: f32,
8018 #[doc = "Y position (NED)"]
8019 pub y: f32,
8020 #[doc = "Z position (NED)"]
8021 pub z: f32,
8022 #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
8023 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8024 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8025 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8026 pub covariance: [f32; 21],
8027}
8028impl ATT_POS_MOCAP_DATA {
8029 pub const ENCODED_LEN: usize = 120usize;
8030 pub const DEFAULT: Self = Self {
8031 time_usec: 0_u64,
8032 q: [0.0_f32; 4usize],
8033 x: 0.0_f32,
8034 y: 0.0_f32,
8035 z: 0.0_f32,
8036 covariance: [0.0_f32; 21usize],
8037 };
8038 #[cfg(feature = "arbitrary")]
8039 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8040 use arbitrary::{Arbitrary, Unstructured};
8041 let mut buf = [0u8; 1024];
8042 rng.fill_bytes(&mut buf);
8043 let mut unstructured = Unstructured::new(&buf);
8044 Self::arbitrary(&mut unstructured).unwrap_or_default()
8045 }
8046}
8047impl Default for ATT_POS_MOCAP_DATA {
8048 fn default() -> Self {
8049 Self::DEFAULT.clone()
8050 }
8051}
8052impl MessageData for ATT_POS_MOCAP_DATA {
8053 type Message = MavMessage;
8054 const ID: u32 = 138u32;
8055 const NAME: &'static str = "ATT_POS_MOCAP";
8056 const EXTRA_CRC: u8 = 109u8;
8057 const ENCODED_LEN: usize = 120usize;
8058 fn deser(
8059 _version: MavlinkVersion,
8060 __input: &[u8],
8061 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8062 let avail_len = __input.len();
8063 let mut payload_buf = [0; Self::ENCODED_LEN];
8064 let mut buf = if avail_len < Self::ENCODED_LEN {
8065 payload_buf[0..avail_len].copy_from_slice(__input);
8066 Bytes::new(&payload_buf)
8067 } else {
8068 Bytes::new(__input)
8069 };
8070 let mut __struct = Self::default();
8071 __struct.time_usec = buf.get_u64_le()?;
8072 for v in &mut __struct.q {
8073 let val = buf.get_f32_le()?;
8074 *v = val;
8075 }
8076 __struct.x = buf.get_f32_le()?;
8077 __struct.y = buf.get_f32_le()?;
8078 __struct.z = buf.get_f32_le()?;
8079 for v in &mut __struct.covariance {
8080 let val = buf.get_f32_le()?;
8081 *v = val;
8082 }
8083 Ok(__struct)
8084 }
8085 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8086 let mut __tmp = BytesMut::new(bytes);
8087 #[allow(clippy::absurd_extreme_comparisons)]
8088 #[allow(unused_comparisons)]
8089 if __tmp.remaining() < Self::ENCODED_LEN {
8090 panic!(
8091 "buffer is too small (need {} bytes, but got {})",
8092 Self::ENCODED_LEN,
8093 __tmp.remaining(),
8094 )
8095 }
8096 __tmp.put_u64_le(self.time_usec);
8097 for val in &self.q {
8098 __tmp.put_f32_le(*val);
8099 }
8100 __tmp.put_f32_le(self.x);
8101 __tmp.put_f32_le(self.y);
8102 __tmp.put_f32_le(self.z);
8103 if matches!(version, MavlinkVersion::V2) {
8104 for val in &self.covariance {
8105 __tmp.put_f32_le(*val);
8106 }
8107 let len = __tmp.len();
8108 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8109 } else {
8110 __tmp.len()
8111 }
8112 }
8113}
8114#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
8115#[doc = ""]
8116#[doc = "ID: 7"]
8117#[derive(Debug, Clone, PartialEq)]
8118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8120#[cfg_attr(feature = "ts", derive(TS))]
8121#[cfg_attr(feature = "ts", ts(export))]
8122pub struct AUTH_KEY_DATA {
8123 #[doc = "key"]
8124 #[cfg_attr(feature = "ts", ts(type = "string"))]
8125 pub key: CharArray<32>,
8126}
8127impl AUTH_KEY_DATA {
8128 pub const ENCODED_LEN: usize = 32usize;
8129 pub const DEFAULT: Self = Self {
8130 key: CharArray::new([0_u8; 32usize]),
8131 };
8132 #[cfg(feature = "arbitrary")]
8133 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8134 use arbitrary::{Arbitrary, Unstructured};
8135 let mut buf = [0u8; 1024];
8136 rng.fill_bytes(&mut buf);
8137 let mut unstructured = Unstructured::new(&buf);
8138 Self::arbitrary(&mut unstructured).unwrap_or_default()
8139 }
8140}
8141impl Default for AUTH_KEY_DATA {
8142 fn default() -> Self {
8143 Self::DEFAULT.clone()
8144 }
8145}
8146impl MessageData for AUTH_KEY_DATA {
8147 type Message = MavMessage;
8148 const ID: u32 = 7u32;
8149 const NAME: &'static str = "AUTH_KEY";
8150 const EXTRA_CRC: u8 = 119u8;
8151 const ENCODED_LEN: usize = 32usize;
8152 fn deser(
8153 _version: MavlinkVersion,
8154 __input: &[u8],
8155 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8156 let avail_len = __input.len();
8157 let mut payload_buf = [0; Self::ENCODED_LEN];
8158 let mut buf = if avail_len < Self::ENCODED_LEN {
8159 payload_buf[0..avail_len].copy_from_slice(__input);
8160 Bytes::new(&payload_buf)
8161 } else {
8162 Bytes::new(__input)
8163 };
8164 let mut __struct = Self::default();
8165 let mut tmp = [0_u8; 32usize];
8166 for v in &mut tmp {
8167 *v = buf.get_u8()?;
8168 }
8169 __struct.key = CharArray::new(tmp);
8170 Ok(__struct)
8171 }
8172 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8173 let mut __tmp = BytesMut::new(bytes);
8174 #[allow(clippy::absurd_extreme_comparisons)]
8175 #[allow(unused_comparisons)]
8176 if __tmp.remaining() < Self::ENCODED_LEN {
8177 panic!(
8178 "buffer is too small (need {} bytes, but got {})",
8179 Self::ENCODED_LEN,
8180 __tmp.remaining(),
8181 )
8182 }
8183 for val in &self.key {
8184 __tmp.put_u8(*val);
8185 }
8186 if matches!(version, MavlinkVersion::V2) {
8187 let len = __tmp.len();
8188 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8189 } else {
8190 __tmp.len()
8191 }
8192 }
8193}
8194#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
8195#[doc = ""]
8196#[doc = "ID: 286"]
8197#[derive(Debug, Clone, PartialEq)]
8198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8200#[cfg_attr(feature = "ts", derive(TS))]
8201#[cfg_attr(feature = "ts", ts(export))]
8202pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8203 #[doc = "Timestamp (time since system boot)."]
8204 pub time_boot_us: u64,
8205 #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
8206 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8207 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8208 pub q: [f32; 4],
8209 #[doc = "Estimated delay of the attitude data. 0 if unknown."]
8210 pub q_estimated_delay_us: u32,
8211 #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
8212 pub vx: f32,
8213 #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
8214 pub vy: f32,
8215 #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
8216 pub vz: f32,
8217 #[doc = "Estimated delay of the speed data. 0 if unknown."]
8218 pub v_estimated_delay_us: u32,
8219 #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
8220 pub feed_forward_angular_velocity_z: f32,
8221 #[doc = "Bitmap indicating which estimator outputs are valid."]
8222 pub estimator_status: EstimatorStatusFlags,
8223 #[doc = "System ID"]
8224 pub target_system: u8,
8225 #[doc = "Component ID"]
8226 pub target_component: u8,
8227 #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
8228 pub landed_state: MavLandedState,
8229 #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
8230 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8231 pub angular_velocity_z: f32,
8232}
8233impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8234 pub const ENCODED_LEN: usize = 57usize;
8235 pub const DEFAULT: Self = Self {
8236 time_boot_us: 0_u64,
8237 q: [0.0_f32; 4usize],
8238 q_estimated_delay_us: 0_u32,
8239 vx: 0.0_f32,
8240 vy: 0.0_f32,
8241 vz: 0.0_f32,
8242 v_estimated_delay_us: 0_u32,
8243 feed_forward_angular_velocity_z: 0.0_f32,
8244 estimator_status: EstimatorStatusFlags::DEFAULT,
8245 target_system: 0_u8,
8246 target_component: 0_u8,
8247 landed_state: MavLandedState::DEFAULT,
8248 angular_velocity_z: 0.0_f32,
8249 };
8250 #[cfg(feature = "arbitrary")]
8251 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8252 use arbitrary::{Arbitrary, Unstructured};
8253 let mut buf = [0u8; 1024];
8254 rng.fill_bytes(&mut buf);
8255 let mut unstructured = Unstructured::new(&buf);
8256 Self::arbitrary(&mut unstructured).unwrap_or_default()
8257 }
8258}
8259impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8260 fn default() -> Self {
8261 Self::DEFAULT.clone()
8262 }
8263}
8264impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8265 type Message = MavMessage;
8266 const ID: u32 = 286u32;
8267 const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
8268 const EXTRA_CRC: u8 = 210u8;
8269 const ENCODED_LEN: usize = 57usize;
8270 fn deser(
8271 _version: MavlinkVersion,
8272 __input: &[u8],
8273 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8274 let avail_len = __input.len();
8275 let mut payload_buf = [0; Self::ENCODED_LEN];
8276 let mut buf = if avail_len < Self::ENCODED_LEN {
8277 payload_buf[0..avail_len].copy_from_slice(__input);
8278 Bytes::new(&payload_buf)
8279 } else {
8280 Bytes::new(__input)
8281 };
8282 let mut __struct = Self::default();
8283 __struct.time_boot_us = buf.get_u64_le()?;
8284 for v in &mut __struct.q {
8285 let val = buf.get_f32_le()?;
8286 *v = val;
8287 }
8288 __struct.q_estimated_delay_us = buf.get_u32_le()?;
8289 __struct.vx = buf.get_f32_le()?;
8290 __struct.vy = buf.get_f32_le()?;
8291 __struct.vz = buf.get_f32_le()?;
8292 __struct.v_estimated_delay_us = buf.get_u32_le()?;
8293 __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
8294 let tmp = buf.get_u16_le()?;
8295 __struct.estimator_status = EstimatorStatusFlags::from_bits(
8296 tmp as <EstimatorStatusFlags as Flags>::Bits,
8297 )
8298 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8299 flag_type: "EstimatorStatusFlags",
8300 value: tmp as u64,
8301 })?;
8302 __struct.target_system = buf.get_u8()?;
8303 __struct.target_component = buf.get_u8()?;
8304 let tmp = buf.get_u8()?;
8305 __struct.landed_state =
8306 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8307 enum_type: "MavLandedState",
8308 value: tmp as u64,
8309 })?;
8310 __struct.angular_velocity_z = buf.get_f32_le()?;
8311 Ok(__struct)
8312 }
8313 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8314 let mut __tmp = BytesMut::new(bytes);
8315 #[allow(clippy::absurd_extreme_comparisons)]
8316 #[allow(unused_comparisons)]
8317 if __tmp.remaining() < Self::ENCODED_LEN {
8318 panic!(
8319 "buffer is too small (need {} bytes, but got {})",
8320 Self::ENCODED_LEN,
8321 __tmp.remaining(),
8322 )
8323 }
8324 __tmp.put_u64_le(self.time_boot_us);
8325 for val in &self.q {
8326 __tmp.put_f32_le(*val);
8327 }
8328 __tmp.put_u32_le(self.q_estimated_delay_us);
8329 __tmp.put_f32_le(self.vx);
8330 __tmp.put_f32_le(self.vy);
8331 __tmp.put_f32_le(self.vz);
8332 __tmp.put_u32_le(self.v_estimated_delay_us);
8333 __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
8334 __tmp.put_u16_le(self.estimator_status.bits() as u16);
8335 __tmp.put_u8(self.target_system);
8336 __tmp.put_u8(self.target_component);
8337 __tmp.put_u8(self.landed_state as u8);
8338 if matches!(version, MavlinkVersion::V2) {
8339 __tmp.put_f32_le(self.angular_velocity_z);
8340 let len = __tmp.len();
8341 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8342 } else {
8343 __tmp.len()
8344 }
8345 }
8346}
8347#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
8348#[doc = ""]
8349#[doc = "ID: 148"]
8350#[derive(Debug, Clone, PartialEq)]
8351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8353#[cfg_attr(feature = "ts", derive(TS))]
8354#[cfg_attr(feature = "ts", ts(export))]
8355pub struct AUTOPILOT_VERSION_DATA {
8356 #[doc = "Bitmap of capabilities"]
8357 pub capabilities: MavProtocolCapability,
8358 #[doc = "UID if provided by hardware (see uid2)"]
8359 pub uid: u64,
8360 #[doc = "Firmware version number. The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
8361 pub flight_sw_version: u32,
8362 #[doc = "Middleware version number"]
8363 pub middleware_sw_version: u32,
8364 #[doc = "Operating system version number"]
8365 pub os_sw_version: u32,
8366 #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify a board type from an enumeration stored at <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt> and with extensive additions at <https://github.com/ArduPilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt>"]
8367 pub board_version: u32,
8368 #[doc = "ID of the board vendor"]
8369 pub vendor_id: u16,
8370 #[doc = "ID of the product"]
8371 pub product_id: u16,
8372 #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
8373 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8374 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8375 pub flight_custom_version: [u8; 8],
8376 #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
8377 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8378 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8379 pub middleware_custom_version: [u8; 8],
8380 #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
8381 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8382 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8383 pub os_custom_version: [u8; 8],
8384 #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
8385 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8386 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8387 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8388 pub uid2: [u8; 18],
8389}
8390impl AUTOPILOT_VERSION_DATA {
8391 pub const ENCODED_LEN: usize = 78usize;
8392 pub const DEFAULT: Self = Self {
8393 capabilities: MavProtocolCapability::DEFAULT,
8394 uid: 0_u64,
8395 flight_sw_version: 0_u32,
8396 middleware_sw_version: 0_u32,
8397 os_sw_version: 0_u32,
8398 board_version: 0_u32,
8399 vendor_id: 0_u16,
8400 product_id: 0_u16,
8401 flight_custom_version: [0_u8; 8usize],
8402 middleware_custom_version: [0_u8; 8usize],
8403 os_custom_version: [0_u8; 8usize],
8404 uid2: [0_u8; 18usize],
8405 };
8406 #[cfg(feature = "arbitrary")]
8407 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8408 use arbitrary::{Arbitrary, Unstructured};
8409 let mut buf = [0u8; 1024];
8410 rng.fill_bytes(&mut buf);
8411 let mut unstructured = Unstructured::new(&buf);
8412 Self::arbitrary(&mut unstructured).unwrap_or_default()
8413 }
8414}
8415impl Default for AUTOPILOT_VERSION_DATA {
8416 fn default() -> Self {
8417 Self::DEFAULT.clone()
8418 }
8419}
8420impl MessageData for AUTOPILOT_VERSION_DATA {
8421 type Message = MavMessage;
8422 const ID: u32 = 148u32;
8423 const NAME: &'static str = "AUTOPILOT_VERSION";
8424 const EXTRA_CRC: u8 = 178u8;
8425 const ENCODED_LEN: usize = 78usize;
8426 fn deser(
8427 _version: MavlinkVersion,
8428 __input: &[u8],
8429 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8430 let avail_len = __input.len();
8431 let mut payload_buf = [0; Self::ENCODED_LEN];
8432 let mut buf = if avail_len < Self::ENCODED_LEN {
8433 payload_buf[0..avail_len].copy_from_slice(__input);
8434 Bytes::new(&payload_buf)
8435 } else {
8436 Bytes::new(__input)
8437 };
8438 let mut __struct = Self::default();
8439 let tmp = buf.get_u64_le()?;
8440 __struct.capabilities = MavProtocolCapability::from_bits(
8441 tmp as <MavProtocolCapability as Flags>::Bits,
8442 )
8443 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8444 flag_type: "MavProtocolCapability",
8445 value: tmp as u64,
8446 })?;
8447 __struct.uid = buf.get_u64_le()?;
8448 __struct.flight_sw_version = buf.get_u32_le()?;
8449 __struct.middleware_sw_version = buf.get_u32_le()?;
8450 __struct.os_sw_version = buf.get_u32_le()?;
8451 __struct.board_version = buf.get_u32_le()?;
8452 __struct.vendor_id = buf.get_u16_le()?;
8453 __struct.product_id = buf.get_u16_le()?;
8454 for v in &mut __struct.flight_custom_version {
8455 let val = buf.get_u8()?;
8456 *v = val;
8457 }
8458 for v in &mut __struct.middleware_custom_version {
8459 let val = buf.get_u8()?;
8460 *v = val;
8461 }
8462 for v in &mut __struct.os_custom_version {
8463 let val = buf.get_u8()?;
8464 *v = val;
8465 }
8466 for v in &mut __struct.uid2 {
8467 let val = buf.get_u8()?;
8468 *v = val;
8469 }
8470 Ok(__struct)
8471 }
8472 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8473 let mut __tmp = BytesMut::new(bytes);
8474 #[allow(clippy::absurd_extreme_comparisons)]
8475 #[allow(unused_comparisons)]
8476 if __tmp.remaining() < Self::ENCODED_LEN {
8477 panic!(
8478 "buffer is too small (need {} bytes, but got {})",
8479 Self::ENCODED_LEN,
8480 __tmp.remaining(),
8481 )
8482 }
8483 __tmp.put_u64_le(self.capabilities.bits() as u64);
8484 __tmp.put_u64_le(self.uid);
8485 __tmp.put_u32_le(self.flight_sw_version);
8486 __tmp.put_u32_le(self.middleware_sw_version);
8487 __tmp.put_u32_le(self.os_sw_version);
8488 __tmp.put_u32_le(self.board_version);
8489 __tmp.put_u16_le(self.vendor_id);
8490 __tmp.put_u16_le(self.product_id);
8491 for val in &self.flight_custom_version {
8492 __tmp.put_u8(*val);
8493 }
8494 for val in &self.middleware_custom_version {
8495 __tmp.put_u8(*val);
8496 }
8497 for val in &self.os_custom_version {
8498 __tmp.put_u8(*val);
8499 }
8500 if matches!(version, MavlinkVersion::V2) {
8501 for val in &self.uid2 {
8502 __tmp.put_u8(*val);
8503 }
8504 let len = __tmp.len();
8505 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8506 } else {
8507 __tmp.len()
8508 }
8509 }
8510}
8511#[doc = "Information about a flight mode. The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE. Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode. The modes must be available/settable for the current vehicle/frame type. Each mode should only be emitted once (even if it is both standard and custom). Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed. See <https://mavlink.io/en/services/standard_modes.html>."]
8512#[doc = ""]
8513#[doc = "ID: 435"]
8514#[derive(Debug, Clone, PartialEq)]
8515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8517#[cfg_attr(feature = "ts", derive(TS))]
8518#[cfg_attr(feature = "ts", ts(export))]
8519pub struct AVAILABLE_MODES_DATA {
8520 #[doc = "A bitfield for use for autopilot-specific flags"]
8521 pub custom_mode: u32,
8522 #[doc = "Mode properties."]
8523 pub properties: MavModeProperty,
8524 #[doc = "The total number of available modes for the current vehicle type."]
8525 pub number_modes: u8,
8526 #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
8527 pub mode_index: u8,
8528 #[doc = "Standard mode."]
8529 pub standard_mode: MavStandardMode,
8530 #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
8531 #[cfg_attr(feature = "ts", ts(type = "string"))]
8532 pub mode_name: CharArray<35>,
8533}
8534impl AVAILABLE_MODES_DATA {
8535 pub const ENCODED_LEN: usize = 46usize;
8536 pub const DEFAULT: Self = Self {
8537 custom_mode: 0_u32,
8538 properties: MavModeProperty::DEFAULT,
8539 number_modes: 0_u8,
8540 mode_index: 0_u8,
8541 standard_mode: MavStandardMode::DEFAULT,
8542 mode_name: CharArray::new([0_u8; 35usize]),
8543 };
8544 #[cfg(feature = "arbitrary")]
8545 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8546 use arbitrary::{Arbitrary, Unstructured};
8547 let mut buf = [0u8; 1024];
8548 rng.fill_bytes(&mut buf);
8549 let mut unstructured = Unstructured::new(&buf);
8550 Self::arbitrary(&mut unstructured).unwrap_or_default()
8551 }
8552}
8553impl Default for AVAILABLE_MODES_DATA {
8554 fn default() -> Self {
8555 Self::DEFAULT.clone()
8556 }
8557}
8558impl MessageData for AVAILABLE_MODES_DATA {
8559 type Message = MavMessage;
8560 const ID: u32 = 435u32;
8561 const NAME: &'static str = "AVAILABLE_MODES";
8562 const EXTRA_CRC: u8 = 134u8;
8563 const ENCODED_LEN: usize = 46usize;
8564 fn deser(
8565 _version: MavlinkVersion,
8566 __input: &[u8],
8567 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8568 let avail_len = __input.len();
8569 let mut payload_buf = [0; Self::ENCODED_LEN];
8570 let mut buf = if avail_len < Self::ENCODED_LEN {
8571 payload_buf[0..avail_len].copy_from_slice(__input);
8572 Bytes::new(&payload_buf)
8573 } else {
8574 Bytes::new(__input)
8575 };
8576 let mut __struct = Self::default();
8577 __struct.custom_mode = buf.get_u32_le()?;
8578 let tmp = buf.get_u32_le()?;
8579 __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
8580 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8581 flag_type: "MavModeProperty",
8582 value: tmp as u64,
8583 })?;
8584 __struct.number_modes = buf.get_u8()?;
8585 __struct.mode_index = buf.get_u8()?;
8586 let tmp = buf.get_u8()?;
8587 __struct.standard_mode =
8588 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8589 enum_type: "MavStandardMode",
8590 value: tmp as u64,
8591 })?;
8592 let mut tmp = [0_u8; 35usize];
8593 for v in &mut tmp {
8594 *v = buf.get_u8()?;
8595 }
8596 __struct.mode_name = CharArray::new(tmp);
8597 Ok(__struct)
8598 }
8599 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8600 let mut __tmp = BytesMut::new(bytes);
8601 #[allow(clippy::absurd_extreme_comparisons)]
8602 #[allow(unused_comparisons)]
8603 if __tmp.remaining() < Self::ENCODED_LEN {
8604 panic!(
8605 "buffer is too small (need {} bytes, but got {})",
8606 Self::ENCODED_LEN,
8607 __tmp.remaining(),
8608 )
8609 }
8610 __tmp.put_u32_le(self.custom_mode);
8611 __tmp.put_u32_le(self.properties.bits() as u32);
8612 __tmp.put_u8(self.number_modes);
8613 __tmp.put_u8(self.mode_index);
8614 __tmp.put_u8(self.standard_mode as u8);
8615 for val in &self.mode_name {
8616 __tmp.put_u8(*val);
8617 }
8618 if matches!(version, MavlinkVersion::V2) {
8619 let len = __tmp.len();
8620 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8621 } else {
8622 __tmp.len()
8623 }
8624 }
8625}
8626#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed. A receiver must re-request all available modes whenever the sequence number changes. This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change. See <https://mavlink.io/en/services/standard_modes.html>."]
8627#[doc = ""]
8628#[doc = "ID: 437"]
8629#[derive(Debug, Clone, PartialEq)]
8630#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8631#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8632#[cfg_attr(feature = "ts", derive(TS))]
8633#[cfg_attr(feature = "ts", ts(export))]
8634pub struct AVAILABLE_MODES_MONITOR_DATA {
8635 #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
8636 pub seq: u8,
8637}
8638impl AVAILABLE_MODES_MONITOR_DATA {
8639 pub const ENCODED_LEN: usize = 1usize;
8640 pub const DEFAULT: Self = Self { seq: 0_u8 };
8641 #[cfg(feature = "arbitrary")]
8642 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8643 use arbitrary::{Arbitrary, Unstructured};
8644 let mut buf = [0u8; 1024];
8645 rng.fill_bytes(&mut buf);
8646 let mut unstructured = Unstructured::new(&buf);
8647 Self::arbitrary(&mut unstructured).unwrap_or_default()
8648 }
8649}
8650impl Default for AVAILABLE_MODES_MONITOR_DATA {
8651 fn default() -> Self {
8652 Self::DEFAULT.clone()
8653 }
8654}
8655impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
8656 type Message = MavMessage;
8657 const ID: u32 = 437u32;
8658 const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
8659 const EXTRA_CRC: u8 = 30u8;
8660 const ENCODED_LEN: usize = 1usize;
8661 fn deser(
8662 _version: MavlinkVersion,
8663 __input: &[u8],
8664 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8665 let avail_len = __input.len();
8666 let mut payload_buf = [0; Self::ENCODED_LEN];
8667 let mut buf = if avail_len < Self::ENCODED_LEN {
8668 payload_buf[0..avail_len].copy_from_slice(__input);
8669 Bytes::new(&payload_buf)
8670 } else {
8671 Bytes::new(__input)
8672 };
8673 let mut __struct = Self::default();
8674 __struct.seq = buf.get_u8()?;
8675 Ok(__struct)
8676 }
8677 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8678 let mut __tmp = BytesMut::new(bytes);
8679 #[allow(clippy::absurd_extreme_comparisons)]
8680 #[allow(unused_comparisons)]
8681 if __tmp.remaining() < Self::ENCODED_LEN {
8682 panic!(
8683 "buffer is too small (need {} bytes, but got {})",
8684 Self::ENCODED_LEN,
8685 __tmp.remaining(),
8686 )
8687 }
8688 __tmp.put_u8(self.seq);
8689 if matches!(version, MavlinkVersion::V2) {
8690 let len = __tmp.len();
8691 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8692 } else {
8693 __tmp.len()
8694 }
8695 }
8696}
8697#[doc = "Battery information that is static, or requires infrequent update. This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate. BATTERY_STATUS_V2 is used for higher-rate battery status information."]
8698#[doc = ""]
8699#[doc = "ID: 372"]
8700#[derive(Debug, Clone, PartialEq)]
8701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8703#[cfg_attr(feature = "ts", derive(TS))]
8704#[cfg_attr(feature = "ts", ts(export))]
8705pub struct BATTERY_INFO_DATA {
8706 #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
8707 pub discharge_minimum_voltage: f32,
8708 #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
8709 pub charging_minimum_voltage: f32,
8710 #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
8711 pub resting_minimum_voltage: f32,
8712 #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
8713 pub charging_maximum_voltage: f32,
8714 #[doc = "Maximum pack continuous charge current. 0: field not provided."]
8715 pub charging_maximum_current: f32,
8716 #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
8717 pub nominal_voltage: f32,
8718 #[doc = "Maximum pack discharge current. 0: field not provided."]
8719 pub discharge_maximum_current: f32,
8720 #[doc = "Maximum pack discharge burst current. 0: field not provided."]
8721 pub discharge_maximum_burst_current: f32,
8722 #[doc = "Fully charged design capacity. 0: field not provided."]
8723 pub design_capacity: f32,
8724 #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
8725 pub full_charge_capacity: f32,
8726 #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
8727 pub cycle_count: u16,
8728 #[doc = "Battery weight. 0: field not provided."]
8729 pub weight: u16,
8730 #[doc = "Battery ID"]
8731 pub id: u8,
8732 #[doc = "Function of the battery."]
8733 pub battery_function: MavBatteryFunction,
8734 #[doc = "Type (chemistry) of the battery."]
8735 pub mavtype: MavBatteryType,
8736 #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
8737 pub state_of_health: u8,
8738 #[doc = "Number of battery cells in series. 0: field not provided."]
8739 pub cells_in_series: u8,
8740 #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
8741 #[cfg_attr(feature = "ts", ts(type = "string"))]
8742 pub manufacture_date: CharArray<9>,
8743 #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
8744 #[cfg_attr(feature = "ts", ts(type = "string"))]
8745 pub serial_number: CharArray<32>,
8746 #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
8747 #[cfg_attr(feature = "ts", ts(type = "string"))]
8748 pub name: CharArray<50>,
8749}
8750impl BATTERY_INFO_DATA {
8751 pub const ENCODED_LEN: usize = 140usize;
8752 pub const DEFAULT: Self = Self {
8753 discharge_minimum_voltage: 0.0_f32,
8754 charging_minimum_voltage: 0.0_f32,
8755 resting_minimum_voltage: 0.0_f32,
8756 charging_maximum_voltage: 0.0_f32,
8757 charging_maximum_current: 0.0_f32,
8758 nominal_voltage: 0.0_f32,
8759 discharge_maximum_current: 0.0_f32,
8760 discharge_maximum_burst_current: 0.0_f32,
8761 design_capacity: 0.0_f32,
8762 full_charge_capacity: 0.0_f32,
8763 cycle_count: 0_u16,
8764 weight: 0_u16,
8765 id: 0_u8,
8766 battery_function: MavBatteryFunction::DEFAULT,
8767 mavtype: MavBatteryType::DEFAULT,
8768 state_of_health: 0_u8,
8769 cells_in_series: 0_u8,
8770 manufacture_date: CharArray::new([0_u8; 9usize]),
8771 serial_number: CharArray::new([0_u8; 32usize]),
8772 name: CharArray::new([0_u8; 50usize]),
8773 };
8774 #[cfg(feature = "arbitrary")]
8775 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8776 use arbitrary::{Arbitrary, Unstructured};
8777 let mut buf = [0u8; 1024];
8778 rng.fill_bytes(&mut buf);
8779 let mut unstructured = Unstructured::new(&buf);
8780 Self::arbitrary(&mut unstructured).unwrap_or_default()
8781 }
8782}
8783impl Default for BATTERY_INFO_DATA {
8784 fn default() -> Self {
8785 Self::DEFAULT.clone()
8786 }
8787}
8788impl MessageData for BATTERY_INFO_DATA {
8789 type Message = MavMessage;
8790 const ID: u32 = 372u32;
8791 const NAME: &'static str = "BATTERY_INFO";
8792 const EXTRA_CRC: u8 = 26u8;
8793 const ENCODED_LEN: usize = 140usize;
8794 fn deser(
8795 _version: MavlinkVersion,
8796 __input: &[u8],
8797 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8798 let avail_len = __input.len();
8799 let mut payload_buf = [0; Self::ENCODED_LEN];
8800 let mut buf = if avail_len < Self::ENCODED_LEN {
8801 payload_buf[0..avail_len].copy_from_slice(__input);
8802 Bytes::new(&payload_buf)
8803 } else {
8804 Bytes::new(__input)
8805 };
8806 let mut __struct = Self::default();
8807 __struct.discharge_minimum_voltage = buf.get_f32_le()?;
8808 __struct.charging_minimum_voltage = buf.get_f32_le()?;
8809 __struct.resting_minimum_voltage = buf.get_f32_le()?;
8810 __struct.charging_maximum_voltage = buf.get_f32_le()?;
8811 __struct.charging_maximum_current = buf.get_f32_le()?;
8812 __struct.nominal_voltage = buf.get_f32_le()?;
8813 __struct.discharge_maximum_current = buf.get_f32_le()?;
8814 __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
8815 __struct.design_capacity = buf.get_f32_le()?;
8816 __struct.full_charge_capacity = buf.get_f32_le()?;
8817 __struct.cycle_count = buf.get_u16_le()?;
8818 __struct.weight = buf.get_u16_le()?;
8819 __struct.id = buf.get_u8()?;
8820 let tmp = buf.get_u8()?;
8821 __struct.battery_function =
8822 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8823 enum_type: "MavBatteryFunction",
8824 value: tmp as u64,
8825 })?;
8826 let tmp = buf.get_u8()?;
8827 __struct.mavtype =
8828 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8829 enum_type: "MavBatteryType",
8830 value: tmp as u64,
8831 })?;
8832 __struct.state_of_health = buf.get_u8()?;
8833 __struct.cells_in_series = buf.get_u8()?;
8834 let mut tmp = [0_u8; 9usize];
8835 for v in &mut tmp {
8836 *v = buf.get_u8()?;
8837 }
8838 __struct.manufacture_date = CharArray::new(tmp);
8839 let mut tmp = [0_u8; 32usize];
8840 for v in &mut tmp {
8841 *v = buf.get_u8()?;
8842 }
8843 __struct.serial_number = CharArray::new(tmp);
8844 let mut tmp = [0_u8; 50usize];
8845 for v in &mut tmp {
8846 *v = buf.get_u8()?;
8847 }
8848 __struct.name = CharArray::new(tmp);
8849 Ok(__struct)
8850 }
8851 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8852 let mut __tmp = BytesMut::new(bytes);
8853 #[allow(clippy::absurd_extreme_comparisons)]
8854 #[allow(unused_comparisons)]
8855 if __tmp.remaining() < Self::ENCODED_LEN {
8856 panic!(
8857 "buffer is too small (need {} bytes, but got {})",
8858 Self::ENCODED_LEN,
8859 __tmp.remaining(),
8860 )
8861 }
8862 __tmp.put_f32_le(self.discharge_minimum_voltage);
8863 __tmp.put_f32_le(self.charging_minimum_voltage);
8864 __tmp.put_f32_le(self.resting_minimum_voltage);
8865 __tmp.put_f32_le(self.charging_maximum_voltage);
8866 __tmp.put_f32_le(self.charging_maximum_current);
8867 __tmp.put_f32_le(self.nominal_voltage);
8868 __tmp.put_f32_le(self.discharge_maximum_current);
8869 __tmp.put_f32_le(self.discharge_maximum_burst_current);
8870 __tmp.put_f32_le(self.design_capacity);
8871 __tmp.put_f32_le(self.full_charge_capacity);
8872 __tmp.put_u16_le(self.cycle_count);
8873 __tmp.put_u16_le(self.weight);
8874 __tmp.put_u8(self.id);
8875 __tmp.put_u8(self.battery_function as u8);
8876 __tmp.put_u8(self.mavtype as u8);
8877 __tmp.put_u8(self.state_of_health);
8878 __tmp.put_u8(self.cells_in_series);
8879 for val in &self.manufacture_date {
8880 __tmp.put_u8(*val);
8881 }
8882 for val in &self.serial_number {
8883 __tmp.put_u8(*val);
8884 }
8885 for val in &self.name {
8886 __tmp.put_u8(*val);
8887 }
8888 if matches!(version, MavlinkVersion::V2) {
8889 let len = __tmp.len();
8890 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8891 } else {
8892 __tmp.len()
8893 }
8894 }
8895}
8896#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
8897#[doc = ""]
8898#[doc = "ID: 147"]
8899#[derive(Debug, Clone, PartialEq)]
8900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8902#[cfg_attr(feature = "ts", derive(TS))]
8903#[cfg_attr(feature = "ts", ts(export))]
8904pub struct BATTERY_STATUS_DATA {
8905 #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
8906 pub current_consumed: i32,
8907 #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
8908 pub energy_consumed: i32,
8909 #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
8910 pub temperature: i16,
8911 #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
8912 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8913 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8914 pub voltages: [u16; 10],
8915 #[doc = "Battery current, -1: autopilot does not measure the current"]
8916 pub current_battery: i16,
8917 #[doc = "Battery ID"]
8918 pub id: u8,
8919 #[doc = "Function of the battery"]
8920 pub battery_function: MavBatteryFunction,
8921 #[doc = "Type (chemistry) of the battery"]
8922 pub mavtype: MavBatteryType,
8923 #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
8924 pub battery_remaining: i8,
8925 #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
8926 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8927 pub time_remaining: i32,
8928 #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
8929 #[cfg_attr(feature = "serde", serde(default))]
8930 pub charge_state: MavBatteryChargeState,
8931 #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
8932 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8933 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8934 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8935 pub voltages_ext: [u16; 4],
8936 #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
8937 #[cfg_attr(feature = "serde", serde(default))]
8938 pub mode: MavBatteryMode,
8939 #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
8940 #[cfg_attr(feature = "serde", serde(default))]
8941 pub fault_bitmask: MavBatteryFault,
8942}
8943impl BATTERY_STATUS_DATA {
8944 pub const ENCODED_LEN: usize = 54usize;
8945 pub const DEFAULT: Self = Self {
8946 current_consumed: 0_i32,
8947 energy_consumed: 0_i32,
8948 temperature: 0_i16,
8949 voltages: [0_u16; 10usize],
8950 current_battery: 0_i16,
8951 id: 0_u8,
8952 battery_function: MavBatteryFunction::DEFAULT,
8953 mavtype: MavBatteryType::DEFAULT,
8954 battery_remaining: 0_i8,
8955 time_remaining: 0_i32,
8956 charge_state: MavBatteryChargeState::DEFAULT,
8957 voltages_ext: [0_u16; 4usize],
8958 mode: MavBatteryMode::DEFAULT,
8959 fault_bitmask: MavBatteryFault::DEFAULT,
8960 };
8961 #[cfg(feature = "arbitrary")]
8962 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8963 use arbitrary::{Arbitrary, Unstructured};
8964 let mut buf = [0u8; 1024];
8965 rng.fill_bytes(&mut buf);
8966 let mut unstructured = Unstructured::new(&buf);
8967 Self::arbitrary(&mut unstructured).unwrap_or_default()
8968 }
8969}
8970impl Default for BATTERY_STATUS_DATA {
8971 fn default() -> Self {
8972 Self::DEFAULT.clone()
8973 }
8974}
8975impl MessageData for BATTERY_STATUS_DATA {
8976 type Message = MavMessage;
8977 const ID: u32 = 147u32;
8978 const NAME: &'static str = "BATTERY_STATUS";
8979 const EXTRA_CRC: u8 = 154u8;
8980 const ENCODED_LEN: usize = 54usize;
8981 fn deser(
8982 _version: MavlinkVersion,
8983 __input: &[u8],
8984 ) -> Result<Self, ::mavlink_core::error::ParserError> {
8985 let avail_len = __input.len();
8986 let mut payload_buf = [0; Self::ENCODED_LEN];
8987 let mut buf = if avail_len < Self::ENCODED_LEN {
8988 payload_buf[0..avail_len].copy_from_slice(__input);
8989 Bytes::new(&payload_buf)
8990 } else {
8991 Bytes::new(__input)
8992 };
8993 let mut __struct = Self::default();
8994 __struct.current_consumed = buf.get_i32_le()?;
8995 __struct.energy_consumed = buf.get_i32_le()?;
8996 __struct.temperature = buf.get_i16_le()?;
8997 for v in &mut __struct.voltages {
8998 let val = buf.get_u16_le()?;
8999 *v = val;
9000 }
9001 __struct.current_battery = buf.get_i16_le()?;
9002 __struct.id = buf.get_u8()?;
9003 let tmp = buf.get_u8()?;
9004 __struct.battery_function =
9005 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9006 enum_type: "MavBatteryFunction",
9007 value: tmp as u64,
9008 })?;
9009 let tmp = buf.get_u8()?;
9010 __struct.mavtype =
9011 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9012 enum_type: "MavBatteryType",
9013 value: tmp as u64,
9014 })?;
9015 __struct.battery_remaining = buf.get_i8()?;
9016 __struct.time_remaining = buf.get_i32_le()?;
9017 let tmp = buf.get_u8()?;
9018 __struct.charge_state =
9019 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9020 enum_type: "MavBatteryChargeState",
9021 value: tmp as u64,
9022 })?;
9023 for v in &mut __struct.voltages_ext {
9024 let val = buf.get_u16_le()?;
9025 *v = val;
9026 }
9027 let tmp = buf.get_u8()?;
9028 __struct.mode =
9029 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9030 enum_type: "MavBatteryMode",
9031 value: tmp as u64,
9032 })?;
9033 let tmp = buf.get_u32_le()?;
9034 __struct.fault_bitmask = MavBatteryFault::from_bits(
9035 tmp as <MavBatteryFault as Flags>::Bits,
9036 )
9037 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9038 flag_type: "MavBatteryFault",
9039 value: tmp as u64,
9040 })?;
9041 Ok(__struct)
9042 }
9043 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9044 let mut __tmp = BytesMut::new(bytes);
9045 #[allow(clippy::absurd_extreme_comparisons)]
9046 #[allow(unused_comparisons)]
9047 if __tmp.remaining() < Self::ENCODED_LEN {
9048 panic!(
9049 "buffer is too small (need {} bytes, but got {})",
9050 Self::ENCODED_LEN,
9051 __tmp.remaining(),
9052 )
9053 }
9054 __tmp.put_i32_le(self.current_consumed);
9055 __tmp.put_i32_le(self.energy_consumed);
9056 __tmp.put_i16_le(self.temperature);
9057 for val in &self.voltages {
9058 __tmp.put_u16_le(*val);
9059 }
9060 __tmp.put_i16_le(self.current_battery);
9061 __tmp.put_u8(self.id);
9062 __tmp.put_u8(self.battery_function as u8);
9063 __tmp.put_u8(self.mavtype as u8);
9064 __tmp.put_i8(self.battery_remaining);
9065 if matches!(version, MavlinkVersion::V2) {
9066 __tmp.put_i32_le(self.time_remaining);
9067 __tmp.put_u8(self.charge_state as u8);
9068 for val in &self.voltages_ext {
9069 __tmp.put_u16_le(*val);
9070 }
9071 __tmp.put_u8(self.mode as u8);
9072 __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
9073 let len = __tmp.len();
9074 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9075 } else {
9076 __tmp.len()
9077 }
9078 }
9079}
9080#[doc = "Report button state change."]
9081#[doc = ""]
9082#[doc = "ID: 257"]
9083#[derive(Debug, Clone, PartialEq)]
9084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9086#[cfg_attr(feature = "ts", derive(TS))]
9087#[cfg_attr(feature = "ts", ts(export))]
9088pub struct BUTTON_CHANGE_DATA {
9089 #[doc = "Timestamp (time since system boot)."]
9090 pub time_boot_ms: u32,
9091 #[doc = "Time of last change of button state."]
9092 pub last_change_ms: u32,
9093 #[doc = "Bitmap for state of buttons."]
9094 pub state: u8,
9095}
9096impl BUTTON_CHANGE_DATA {
9097 pub const ENCODED_LEN: usize = 9usize;
9098 pub const DEFAULT: Self = Self {
9099 time_boot_ms: 0_u32,
9100 last_change_ms: 0_u32,
9101 state: 0_u8,
9102 };
9103 #[cfg(feature = "arbitrary")]
9104 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9105 use arbitrary::{Arbitrary, Unstructured};
9106 let mut buf = [0u8; 1024];
9107 rng.fill_bytes(&mut buf);
9108 let mut unstructured = Unstructured::new(&buf);
9109 Self::arbitrary(&mut unstructured).unwrap_or_default()
9110 }
9111}
9112impl Default for BUTTON_CHANGE_DATA {
9113 fn default() -> Self {
9114 Self::DEFAULT.clone()
9115 }
9116}
9117impl MessageData for BUTTON_CHANGE_DATA {
9118 type Message = MavMessage;
9119 const ID: u32 = 257u32;
9120 const NAME: &'static str = "BUTTON_CHANGE";
9121 const EXTRA_CRC: u8 = 131u8;
9122 const ENCODED_LEN: usize = 9usize;
9123 fn deser(
9124 _version: MavlinkVersion,
9125 __input: &[u8],
9126 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9127 let avail_len = __input.len();
9128 let mut payload_buf = [0; Self::ENCODED_LEN];
9129 let mut buf = if avail_len < Self::ENCODED_LEN {
9130 payload_buf[0..avail_len].copy_from_slice(__input);
9131 Bytes::new(&payload_buf)
9132 } else {
9133 Bytes::new(__input)
9134 };
9135 let mut __struct = Self::default();
9136 __struct.time_boot_ms = buf.get_u32_le()?;
9137 __struct.last_change_ms = buf.get_u32_le()?;
9138 __struct.state = buf.get_u8()?;
9139 Ok(__struct)
9140 }
9141 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9142 let mut __tmp = BytesMut::new(bytes);
9143 #[allow(clippy::absurd_extreme_comparisons)]
9144 #[allow(unused_comparisons)]
9145 if __tmp.remaining() < Self::ENCODED_LEN {
9146 panic!(
9147 "buffer is too small (need {} bytes, but got {})",
9148 Self::ENCODED_LEN,
9149 __tmp.remaining(),
9150 )
9151 }
9152 __tmp.put_u32_le(self.time_boot_ms);
9153 __tmp.put_u32_le(self.last_change_ms);
9154 __tmp.put_u8(self.state);
9155 if matches!(version, MavlinkVersion::V2) {
9156 let len = __tmp.len();
9157 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9158 } else {
9159 __tmp.len()
9160 }
9161 }
9162}
9163#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9164#[doc = ""]
9165#[doc = "ID: 262"]
9166#[derive(Debug, Clone, PartialEq)]
9167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9169#[cfg_attr(feature = "ts", derive(TS))]
9170#[cfg_attr(feature = "ts", ts(export))]
9171pub struct CAMERA_CAPTURE_STATUS_DATA {
9172 #[doc = "Timestamp (time since system boot)."]
9173 pub time_boot_ms: u32,
9174 #[doc = "Image capture interval"]
9175 pub image_interval: f32,
9176 #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
9177 pub recording_time_ms: u32,
9178 #[doc = "Available storage capacity."]
9179 pub available_capacity: f32,
9180 #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
9181 pub image_status: u8,
9182 #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
9183 pub video_status: u8,
9184 #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
9185 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9186 pub image_count: i32,
9187 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9188 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9189 pub camera_device_id: u8,
9190}
9191impl CAMERA_CAPTURE_STATUS_DATA {
9192 pub const ENCODED_LEN: usize = 23usize;
9193 pub const DEFAULT: Self = Self {
9194 time_boot_ms: 0_u32,
9195 image_interval: 0.0_f32,
9196 recording_time_ms: 0_u32,
9197 available_capacity: 0.0_f32,
9198 image_status: 0_u8,
9199 video_status: 0_u8,
9200 image_count: 0_i32,
9201 camera_device_id: 0_u8,
9202 };
9203 #[cfg(feature = "arbitrary")]
9204 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9205 use arbitrary::{Arbitrary, Unstructured};
9206 let mut buf = [0u8; 1024];
9207 rng.fill_bytes(&mut buf);
9208 let mut unstructured = Unstructured::new(&buf);
9209 Self::arbitrary(&mut unstructured).unwrap_or_default()
9210 }
9211}
9212impl Default for CAMERA_CAPTURE_STATUS_DATA {
9213 fn default() -> Self {
9214 Self::DEFAULT.clone()
9215 }
9216}
9217impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
9218 type Message = MavMessage;
9219 const ID: u32 = 262u32;
9220 const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
9221 const EXTRA_CRC: u8 = 12u8;
9222 const ENCODED_LEN: usize = 23usize;
9223 fn deser(
9224 _version: MavlinkVersion,
9225 __input: &[u8],
9226 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9227 let avail_len = __input.len();
9228 let mut payload_buf = [0; Self::ENCODED_LEN];
9229 let mut buf = if avail_len < Self::ENCODED_LEN {
9230 payload_buf[0..avail_len].copy_from_slice(__input);
9231 Bytes::new(&payload_buf)
9232 } else {
9233 Bytes::new(__input)
9234 };
9235 let mut __struct = Self::default();
9236 __struct.time_boot_ms = buf.get_u32_le()?;
9237 __struct.image_interval = buf.get_f32_le()?;
9238 __struct.recording_time_ms = buf.get_u32_le()?;
9239 __struct.available_capacity = buf.get_f32_le()?;
9240 __struct.image_status = buf.get_u8()?;
9241 __struct.video_status = buf.get_u8()?;
9242 __struct.image_count = buf.get_i32_le()?;
9243 __struct.camera_device_id = buf.get_u8()?;
9244 Ok(__struct)
9245 }
9246 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9247 let mut __tmp = BytesMut::new(bytes);
9248 #[allow(clippy::absurd_extreme_comparisons)]
9249 #[allow(unused_comparisons)]
9250 if __tmp.remaining() < Self::ENCODED_LEN {
9251 panic!(
9252 "buffer is too small (need {} bytes, but got {})",
9253 Self::ENCODED_LEN,
9254 __tmp.remaining(),
9255 )
9256 }
9257 __tmp.put_u32_le(self.time_boot_ms);
9258 __tmp.put_f32_le(self.image_interval);
9259 __tmp.put_u32_le(self.recording_time_ms);
9260 __tmp.put_f32_le(self.available_capacity);
9261 __tmp.put_u8(self.image_status);
9262 __tmp.put_u8(self.video_status);
9263 if matches!(version, MavlinkVersion::V2) {
9264 __tmp.put_i32_le(self.image_count);
9265 __tmp.put_u8(self.camera_device_id);
9266 let len = __tmp.len();
9267 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9268 } else {
9269 __tmp.len()
9270 }
9271 }
9272}
9273#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9274#[doc = ""]
9275#[doc = "ID: 271"]
9276#[derive(Debug, Clone, PartialEq)]
9277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9279#[cfg_attr(feature = "ts", derive(TS))]
9280#[cfg_attr(feature = "ts", ts(export))]
9281pub struct CAMERA_FOV_STATUS_DATA {
9282 #[doc = "Timestamp (time since system boot)."]
9283 pub time_boot_ms: u32,
9284 #[doc = "Latitude of camera (INT32_MAX if unknown)."]
9285 pub lat_camera: i32,
9286 #[doc = "Longitude of camera (INT32_MAX if unknown)."]
9287 pub lon_camera: i32,
9288 #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
9289 pub alt_camera: i32,
9290 #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
9291 pub lat_image: i32,
9292 #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
9293 pub lon_image: i32,
9294 #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
9295 pub alt_image: i32,
9296 #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
9297 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9298 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9299 pub q: [f32; 4],
9300 #[doc = "Horizontal field of view (NaN if unknown)."]
9301 pub hfov: f32,
9302 #[doc = "Vertical field of view (NaN if unknown)."]
9303 pub vfov: f32,
9304 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9305 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9306 pub camera_device_id: u8,
9307}
9308impl CAMERA_FOV_STATUS_DATA {
9309 pub const ENCODED_LEN: usize = 53usize;
9310 pub const DEFAULT: Self = Self {
9311 time_boot_ms: 0_u32,
9312 lat_camera: 0_i32,
9313 lon_camera: 0_i32,
9314 alt_camera: 0_i32,
9315 lat_image: 0_i32,
9316 lon_image: 0_i32,
9317 alt_image: 0_i32,
9318 q: [0.0_f32; 4usize],
9319 hfov: 0.0_f32,
9320 vfov: 0.0_f32,
9321 camera_device_id: 0_u8,
9322 };
9323 #[cfg(feature = "arbitrary")]
9324 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9325 use arbitrary::{Arbitrary, Unstructured};
9326 let mut buf = [0u8; 1024];
9327 rng.fill_bytes(&mut buf);
9328 let mut unstructured = Unstructured::new(&buf);
9329 Self::arbitrary(&mut unstructured).unwrap_or_default()
9330 }
9331}
9332impl Default for CAMERA_FOV_STATUS_DATA {
9333 fn default() -> Self {
9334 Self::DEFAULT.clone()
9335 }
9336}
9337impl MessageData for CAMERA_FOV_STATUS_DATA {
9338 type Message = MavMessage;
9339 const ID: u32 = 271u32;
9340 const NAME: &'static str = "CAMERA_FOV_STATUS";
9341 const EXTRA_CRC: u8 = 22u8;
9342 const ENCODED_LEN: usize = 53usize;
9343 fn deser(
9344 _version: MavlinkVersion,
9345 __input: &[u8],
9346 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9347 let avail_len = __input.len();
9348 let mut payload_buf = [0; Self::ENCODED_LEN];
9349 let mut buf = if avail_len < Self::ENCODED_LEN {
9350 payload_buf[0..avail_len].copy_from_slice(__input);
9351 Bytes::new(&payload_buf)
9352 } else {
9353 Bytes::new(__input)
9354 };
9355 let mut __struct = Self::default();
9356 __struct.time_boot_ms = buf.get_u32_le()?;
9357 __struct.lat_camera = buf.get_i32_le()?;
9358 __struct.lon_camera = buf.get_i32_le()?;
9359 __struct.alt_camera = buf.get_i32_le()?;
9360 __struct.lat_image = buf.get_i32_le()?;
9361 __struct.lon_image = buf.get_i32_le()?;
9362 __struct.alt_image = buf.get_i32_le()?;
9363 for v in &mut __struct.q {
9364 let val = buf.get_f32_le()?;
9365 *v = val;
9366 }
9367 __struct.hfov = buf.get_f32_le()?;
9368 __struct.vfov = buf.get_f32_le()?;
9369 __struct.camera_device_id = buf.get_u8()?;
9370 Ok(__struct)
9371 }
9372 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9373 let mut __tmp = BytesMut::new(bytes);
9374 #[allow(clippy::absurd_extreme_comparisons)]
9375 #[allow(unused_comparisons)]
9376 if __tmp.remaining() < Self::ENCODED_LEN {
9377 panic!(
9378 "buffer is too small (need {} bytes, but got {})",
9379 Self::ENCODED_LEN,
9380 __tmp.remaining(),
9381 )
9382 }
9383 __tmp.put_u32_le(self.time_boot_ms);
9384 __tmp.put_i32_le(self.lat_camera);
9385 __tmp.put_i32_le(self.lon_camera);
9386 __tmp.put_i32_le(self.alt_camera);
9387 __tmp.put_i32_le(self.lat_image);
9388 __tmp.put_i32_le(self.lon_image);
9389 __tmp.put_i32_le(self.alt_image);
9390 for val in &self.q {
9391 __tmp.put_f32_le(*val);
9392 }
9393 __tmp.put_f32_le(self.hfov);
9394 __tmp.put_f32_le(self.vfov);
9395 if matches!(version, MavlinkVersion::V2) {
9396 __tmp.put_u8(self.camera_device_id);
9397 let len = __tmp.len();
9398 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9399 } else {
9400 __tmp.len()
9401 }
9402 }
9403}
9404#[doc = "Information about a captured image. This is emitted every time a message is captured. MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers: MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers. MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send: set to 0 (default) to send just the the message for the sequence number in param 2, set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers, set to the sequence number of the final message in the range."]
9405#[doc = ""]
9406#[doc = "ID: 263"]
9407#[derive(Debug, Clone, PartialEq)]
9408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9410#[cfg_attr(feature = "ts", derive(TS))]
9411#[cfg_attr(feature = "ts", ts(export))]
9412pub struct CAMERA_IMAGE_CAPTURED_DATA {
9413 #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
9414 pub time_utc: u64,
9415 #[doc = "Timestamp (time since system boot)."]
9416 pub time_boot_ms: u32,
9417 #[doc = "Latitude where image was taken"]
9418 pub lat: i32,
9419 #[doc = "Longitude where capture was taken"]
9420 pub lon: i32,
9421 #[doc = "Altitude (MSL) where image was taken"]
9422 pub alt: i32,
9423 #[doc = "Altitude above ground"]
9424 pub relative_alt: i32,
9425 #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
9426 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9427 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9428 pub q: [f32; 4],
9429 #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
9430 pub image_index: i32,
9431 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
9432 pub camera_id: u8,
9433 #[doc = "Image was captured successfully (MAV_BOOL_TRUE). Values not equal to 0 or 1 are invalid."]
9434 pub capture_result: MavBool,
9435 #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
9436 #[cfg_attr(feature = "ts", ts(type = "string"))]
9437 pub file_url: CharArray<205>,
9438}
9439impl CAMERA_IMAGE_CAPTURED_DATA {
9440 pub const ENCODED_LEN: usize = 255usize;
9441 pub const DEFAULT: Self = Self {
9442 time_utc: 0_u64,
9443 time_boot_ms: 0_u32,
9444 lat: 0_i32,
9445 lon: 0_i32,
9446 alt: 0_i32,
9447 relative_alt: 0_i32,
9448 q: [0.0_f32; 4usize],
9449 image_index: 0_i32,
9450 camera_id: 0_u8,
9451 capture_result: MavBool::DEFAULT,
9452 file_url: CharArray::new([0_u8; 205usize]),
9453 };
9454 #[cfg(feature = "arbitrary")]
9455 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9456 use arbitrary::{Arbitrary, Unstructured};
9457 let mut buf = [0u8; 1024];
9458 rng.fill_bytes(&mut buf);
9459 let mut unstructured = Unstructured::new(&buf);
9460 Self::arbitrary(&mut unstructured).unwrap_or_default()
9461 }
9462}
9463impl Default for CAMERA_IMAGE_CAPTURED_DATA {
9464 fn default() -> Self {
9465 Self::DEFAULT.clone()
9466 }
9467}
9468impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
9469 type Message = MavMessage;
9470 const ID: u32 = 263u32;
9471 const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
9472 const EXTRA_CRC: u8 = 133u8;
9473 const ENCODED_LEN: usize = 255usize;
9474 fn deser(
9475 _version: MavlinkVersion,
9476 __input: &[u8],
9477 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9478 let avail_len = __input.len();
9479 let mut payload_buf = [0; Self::ENCODED_LEN];
9480 let mut buf = if avail_len < Self::ENCODED_LEN {
9481 payload_buf[0..avail_len].copy_from_slice(__input);
9482 Bytes::new(&payload_buf)
9483 } else {
9484 Bytes::new(__input)
9485 };
9486 let mut __struct = Self::default();
9487 __struct.time_utc = buf.get_u64_le()?;
9488 __struct.time_boot_ms = buf.get_u32_le()?;
9489 __struct.lat = buf.get_i32_le()?;
9490 __struct.lon = buf.get_i32_le()?;
9491 __struct.alt = buf.get_i32_le()?;
9492 __struct.relative_alt = buf.get_i32_le()?;
9493 for v in &mut __struct.q {
9494 let val = buf.get_f32_le()?;
9495 *v = val;
9496 }
9497 __struct.image_index = buf.get_i32_le()?;
9498 __struct.camera_id = buf.get_u8()?;
9499 let tmp = buf.get_i8()?;
9500 __struct.capture_result = MavBool::from_bits(tmp as <MavBool as Flags>::Bits).ok_or(
9501 ::mavlink_core::error::ParserError::InvalidFlag {
9502 flag_type: "MavBool",
9503 value: tmp as u64,
9504 },
9505 )?;
9506 let mut tmp = [0_u8; 205usize];
9507 for v in &mut tmp {
9508 *v = buf.get_u8()?;
9509 }
9510 __struct.file_url = CharArray::new(tmp);
9511 Ok(__struct)
9512 }
9513 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9514 let mut __tmp = BytesMut::new(bytes);
9515 #[allow(clippy::absurd_extreme_comparisons)]
9516 #[allow(unused_comparisons)]
9517 if __tmp.remaining() < Self::ENCODED_LEN {
9518 panic!(
9519 "buffer is too small (need {} bytes, but got {})",
9520 Self::ENCODED_LEN,
9521 __tmp.remaining(),
9522 )
9523 }
9524 __tmp.put_u64_le(self.time_utc);
9525 __tmp.put_u32_le(self.time_boot_ms);
9526 __tmp.put_i32_le(self.lat);
9527 __tmp.put_i32_le(self.lon);
9528 __tmp.put_i32_le(self.alt);
9529 __tmp.put_i32_le(self.relative_alt);
9530 for val in &self.q {
9531 __tmp.put_f32_le(*val);
9532 }
9533 __tmp.put_i32_le(self.image_index);
9534 __tmp.put_u8(self.camera_id);
9535 __tmp.put_i8(self.capture_result.bits() as i8);
9536 for val in &self.file_url {
9537 __tmp.put_u8(*val);
9538 }
9539 if matches!(version, MavlinkVersion::V2) {
9540 let len = __tmp.len();
9541 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9542 } else {
9543 __tmp.len()
9544 }
9545 }
9546}
9547#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9548#[doc = ""]
9549#[doc = "ID: 259"]
9550#[derive(Debug, Clone, PartialEq)]
9551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9553#[cfg_attr(feature = "ts", derive(TS))]
9554#[cfg_attr(feature = "ts", ts(export))]
9555pub struct CAMERA_INFORMATION_DATA {
9556 #[doc = "Timestamp (time since system boot)."]
9557 pub time_boot_ms: u32,
9558 #[doc = "Version of the camera firmware, encoded as: `(Dev&0xff)<<24 + (Patch&0xff)<<16 + (Minor&0xff)<<8 + (Major&0xff)`. Use 0 if not known."]
9559 pub firmware_version: u32,
9560 #[doc = "Focal length. Use NaN if not known."]
9561 pub focal_length: f32,
9562 #[doc = "Image sensor size horizontal. Use NaN if not known."]
9563 pub sensor_size_h: f32,
9564 #[doc = "Image sensor size vertical. Use NaN if not known."]
9565 pub sensor_size_v: f32,
9566 #[doc = "Bitmap of camera capability flags."]
9567 pub flags: CameraCapFlags,
9568 #[doc = "Horizontal image resolution. Use 0 if not known."]
9569 pub resolution_h: u16,
9570 #[doc = "Vertical image resolution. Use 0 if not known."]
9571 pub resolution_v: u16,
9572 #[doc = "Camera definition version (iteration). Use 0 if not known."]
9573 pub cam_definition_version: u16,
9574 #[doc = "Name of the camera vendor"]
9575 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9576 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9577 pub vendor_name: [u8; 32],
9578 #[doc = "Name of the camera model"]
9579 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9580 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9581 pub model_name: [u8; 32],
9582 #[doc = "Reserved for a lens ID. Use 0 if not known."]
9583 pub lens_id: u8,
9584 #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated. Use a zero-length string if not known."]
9585 #[cfg_attr(feature = "ts", ts(type = "string"))]
9586 pub cam_definition_uri: CharArray<140>,
9587 #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
9588 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9589 pub gimbal_device_id: u8,
9590 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9591 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9592 pub camera_device_id: u8,
9593}
9594impl CAMERA_INFORMATION_DATA {
9595 pub const ENCODED_LEN: usize = 237usize;
9596 pub const DEFAULT: Self = Self {
9597 time_boot_ms: 0_u32,
9598 firmware_version: 0_u32,
9599 focal_length: 0.0_f32,
9600 sensor_size_h: 0.0_f32,
9601 sensor_size_v: 0.0_f32,
9602 flags: CameraCapFlags::DEFAULT,
9603 resolution_h: 0_u16,
9604 resolution_v: 0_u16,
9605 cam_definition_version: 0_u16,
9606 vendor_name: [0_u8; 32usize],
9607 model_name: [0_u8; 32usize],
9608 lens_id: 0_u8,
9609 cam_definition_uri: CharArray::new([0_u8; 140usize]),
9610 gimbal_device_id: 0_u8,
9611 camera_device_id: 0_u8,
9612 };
9613 #[cfg(feature = "arbitrary")]
9614 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9615 use arbitrary::{Arbitrary, Unstructured};
9616 let mut buf = [0u8; 1024];
9617 rng.fill_bytes(&mut buf);
9618 let mut unstructured = Unstructured::new(&buf);
9619 Self::arbitrary(&mut unstructured).unwrap_or_default()
9620 }
9621}
9622impl Default for CAMERA_INFORMATION_DATA {
9623 fn default() -> Self {
9624 Self::DEFAULT.clone()
9625 }
9626}
9627impl MessageData for CAMERA_INFORMATION_DATA {
9628 type Message = MavMessage;
9629 const ID: u32 = 259u32;
9630 const NAME: &'static str = "CAMERA_INFORMATION";
9631 const EXTRA_CRC: u8 = 92u8;
9632 const ENCODED_LEN: usize = 237usize;
9633 fn deser(
9634 _version: MavlinkVersion,
9635 __input: &[u8],
9636 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9637 let avail_len = __input.len();
9638 let mut payload_buf = [0; Self::ENCODED_LEN];
9639 let mut buf = if avail_len < Self::ENCODED_LEN {
9640 payload_buf[0..avail_len].copy_from_slice(__input);
9641 Bytes::new(&payload_buf)
9642 } else {
9643 Bytes::new(__input)
9644 };
9645 let mut __struct = Self::default();
9646 __struct.time_boot_ms = buf.get_u32_le()?;
9647 __struct.firmware_version = buf.get_u32_le()?;
9648 __struct.focal_length = buf.get_f32_le()?;
9649 __struct.sensor_size_h = buf.get_f32_le()?;
9650 __struct.sensor_size_v = buf.get_f32_le()?;
9651 let tmp = buf.get_u32_le()?;
9652 __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
9653 ::mavlink_core::error::ParserError::InvalidFlag {
9654 flag_type: "CameraCapFlags",
9655 value: tmp as u64,
9656 },
9657 )?;
9658 __struct.resolution_h = buf.get_u16_le()?;
9659 __struct.resolution_v = buf.get_u16_le()?;
9660 __struct.cam_definition_version = buf.get_u16_le()?;
9661 for v in &mut __struct.vendor_name {
9662 let val = buf.get_u8()?;
9663 *v = val;
9664 }
9665 for v in &mut __struct.model_name {
9666 let val = buf.get_u8()?;
9667 *v = val;
9668 }
9669 __struct.lens_id = buf.get_u8()?;
9670 let mut tmp = [0_u8; 140usize];
9671 for v in &mut tmp {
9672 *v = buf.get_u8()?;
9673 }
9674 __struct.cam_definition_uri = CharArray::new(tmp);
9675 __struct.gimbal_device_id = buf.get_u8()?;
9676 __struct.camera_device_id = buf.get_u8()?;
9677 Ok(__struct)
9678 }
9679 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9680 let mut __tmp = BytesMut::new(bytes);
9681 #[allow(clippy::absurd_extreme_comparisons)]
9682 #[allow(unused_comparisons)]
9683 if __tmp.remaining() < Self::ENCODED_LEN {
9684 panic!(
9685 "buffer is too small (need {} bytes, but got {})",
9686 Self::ENCODED_LEN,
9687 __tmp.remaining(),
9688 )
9689 }
9690 __tmp.put_u32_le(self.time_boot_ms);
9691 __tmp.put_u32_le(self.firmware_version);
9692 __tmp.put_f32_le(self.focal_length);
9693 __tmp.put_f32_le(self.sensor_size_h);
9694 __tmp.put_f32_le(self.sensor_size_v);
9695 __tmp.put_u32_le(self.flags.bits() as u32);
9696 __tmp.put_u16_le(self.resolution_h);
9697 __tmp.put_u16_le(self.resolution_v);
9698 __tmp.put_u16_le(self.cam_definition_version);
9699 for val in &self.vendor_name {
9700 __tmp.put_u8(*val);
9701 }
9702 for val in &self.model_name {
9703 __tmp.put_u8(*val);
9704 }
9705 __tmp.put_u8(self.lens_id);
9706 for val in &self.cam_definition_uri {
9707 __tmp.put_u8(*val);
9708 }
9709 if matches!(version, MavlinkVersion::V2) {
9710 __tmp.put_u8(self.gimbal_device_id);
9711 __tmp.put_u8(self.camera_device_id);
9712 let len = __tmp.len();
9713 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9714 } else {
9715 __tmp.len()
9716 }
9717 }
9718}
9719#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9720#[doc = ""]
9721#[doc = "ID: 260"]
9722#[derive(Debug, Clone, PartialEq)]
9723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9725#[cfg_attr(feature = "ts", derive(TS))]
9726#[cfg_attr(feature = "ts", ts(export))]
9727pub struct CAMERA_SETTINGS_DATA {
9728 #[doc = "Timestamp (time since system boot)."]
9729 pub time_boot_ms: u32,
9730 #[doc = "Camera mode"]
9731 pub mode_id: CameraMode,
9732 #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
9733 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9734 pub zoomLevel: f32,
9735 #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
9736 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9737 pub focusLevel: f32,
9738 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9739 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9740 pub camera_device_id: u8,
9741}
9742impl CAMERA_SETTINGS_DATA {
9743 pub const ENCODED_LEN: usize = 14usize;
9744 pub const DEFAULT: Self = Self {
9745 time_boot_ms: 0_u32,
9746 mode_id: CameraMode::DEFAULT,
9747 zoomLevel: 0.0_f32,
9748 focusLevel: 0.0_f32,
9749 camera_device_id: 0_u8,
9750 };
9751 #[cfg(feature = "arbitrary")]
9752 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9753 use arbitrary::{Arbitrary, Unstructured};
9754 let mut buf = [0u8; 1024];
9755 rng.fill_bytes(&mut buf);
9756 let mut unstructured = Unstructured::new(&buf);
9757 Self::arbitrary(&mut unstructured).unwrap_or_default()
9758 }
9759}
9760impl Default for CAMERA_SETTINGS_DATA {
9761 fn default() -> Self {
9762 Self::DEFAULT.clone()
9763 }
9764}
9765impl MessageData for CAMERA_SETTINGS_DATA {
9766 type Message = MavMessage;
9767 const ID: u32 = 260u32;
9768 const NAME: &'static str = "CAMERA_SETTINGS";
9769 const EXTRA_CRC: u8 = 146u8;
9770 const ENCODED_LEN: usize = 14usize;
9771 fn deser(
9772 _version: MavlinkVersion,
9773 __input: &[u8],
9774 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9775 let avail_len = __input.len();
9776 let mut payload_buf = [0; Self::ENCODED_LEN];
9777 let mut buf = if avail_len < Self::ENCODED_LEN {
9778 payload_buf[0..avail_len].copy_from_slice(__input);
9779 Bytes::new(&payload_buf)
9780 } else {
9781 Bytes::new(__input)
9782 };
9783 let mut __struct = Self::default();
9784 __struct.time_boot_ms = buf.get_u32_le()?;
9785 let tmp = buf.get_u8()?;
9786 __struct.mode_id =
9787 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9788 enum_type: "CameraMode",
9789 value: tmp as u64,
9790 })?;
9791 __struct.zoomLevel = buf.get_f32_le()?;
9792 __struct.focusLevel = buf.get_f32_le()?;
9793 __struct.camera_device_id = buf.get_u8()?;
9794 Ok(__struct)
9795 }
9796 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9797 let mut __tmp = BytesMut::new(bytes);
9798 #[allow(clippy::absurd_extreme_comparisons)]
9799 #[allow(unused_comparisons)]
9800 if __tmp.remaining() < Self::ENCODED_LEN {
9801 panic!(
9802 "buffer is too small (need {} bytes, but got {})",
9803 Self::ENCODED_LEN,
9804 __tmp.remaining(),
9805 )
9806 }
9807 __tmp.put_u32_le(self.time_boot_ms);
9808 __tmp.put_u8(self.mode_id as u8);
9809 if matches!(version, MavlinkVersion::V2) {
9810 __tmp.put_f32_le(self.zoomLevel);
9811 __tmp.put_f32_le(self.focusLevel);
9812 __tmp.put_u8(self.camera_device_id);
9813 let len = __tmp.len();
9814 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9815 } else {
9816 __tmp.len()
9817 }
9818 }
9819}
9820#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
9821#[doc = ""]
9822#[doc = "ID: 277"]
9823#[derive(Debug, Clone, PartialEq)]
9824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9826#[cfg_attr(feature = "ts", derive(TS))]
9827#[cfg_attr(feature = "ts", ts(export))]
9828pub struct CAMERA_THERMAL_RANGE_DATA {
9829 #[doc = "Timestamp (time since system boot)."]
9830 pub time_boot_ms: u32,
9831 #[doc = "Temperature max."]
9832 pub max: f32,
9833 #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
9834 pub max_point_x: f32,
9835 #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
9836 pub max_point_y: f32,
9837 #[doc = "Temperature min."]
9838 pub min: f32,
9839 #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
9840 pub min_point_x: f32,
9841 #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
9842 pub min_point_y: f32,
9843 #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
9844 pub stream_id: u8,
9845 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9846 pub camera_device_id: u8,
9847}
9848impl CAMERA_THERMAL_RANGE_DATA {
9849 pub const ENCODED_LEN: usize = 30usize;
9850 pub const DEFAULT: Self = Self {
9851 time_boot_ms: 0_u32,
9852 max: 0.0_f32,
9853 max_point_x: 0.0_f32,
9854 max_point_y: 0.0_f32,
9855 min: 0.0_f32,
9856 min_point_x: 0.0_f32,
9857 min_point_y: 0.0_f32,
9858 stream_id: 0_u8,
9859 camera_device_id: 0_u8,
9860 };
9861 #[cfg(feature = "arbitrary")]
9862 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9863 use arbitrary::{Arbitrary, Unstructured};
9864 let mut buf = [0u8; 1024];
9865 rng.fill_bytes(&mut buf);
9866 let mut unstructured = Unstructured::new(&buf);
9867 Self::arbitrary(&mut unstructured).unwrap_or_default()
9868 }
9869}
9870impl Default for CAMERA_THERMAL_RANGE_DATA {
9871 fn default() -> Self {
9872 Self::DEFAULT.clone()
9873 }
9874}
9875impl MessageData for CAMERA_THERMAL_RANGE_DATA {
9876 type Message = MavMessage;
9877 const ID: u32 = 277u32;
9878 const NAME: &'static str = "CAMERA_THERMAL_RANGE";
9879 const EXTRA_CRC: u8 = 62u8;
9880 const ENCODED_LEN: usize = 30usize;
9881 fn deser(
9882 _version: MavlinkVersion,
9883 __input: &[u8],
9884 ) -> Result<Self, ::mavlink_core::error::ParserError> {
9885 let avail_len = __input.len();
9886 let mut payload_buf = [0; Self::ENCODED_LEN];
9887 let mut buf = if avail_len < Self::ENCODED_LEN {
9888 payload_buf[0..avail_len].copy_from_slice(__input);
9889 Bytes::new(&payload_buf)
9890 } else {
9891 Bytes::new(__input)
9892 };
9893 let mut __struct = Self::default();
9894 __struct.time_boot_ms = buf.get_u32_le()?;
9895 __struct.max = buf.get_f32_le()?;
9896 __struct.max_point_x = buf.get_f32_le()?;
9897 __struct.max_point_y = buf.get_f32_le()?;
9898 __struct.min = buf.get_f32_le()?;
9899 __struct.min_point_x = buf.get_f32_le()?;
9900 __struct.min_point_y = buf.get_f32_le()?;
9901 __struct.stream_id = buf.get_u8()?;
9902 __struct.camera_device_id = buf.get_u8()?;
9903 Ok(__struct)
9904 }
9905 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9906 let mut __tmp = BytesMut::new(bytes);
9907 #[allow(clippy::absurd_extreme_comparisons)]
9908 #[allow(unused_comparisons)]
9909 if __tmp.remaining() < Self::ENCODED_LEN {
9910 panic!(
9911 "buffer is too small (need {} bytes, but got {})",
9912 Self::ENCODED_LEN,
9913 __tmp.remaining(),
9914 )
9915 }
9916 __tmp.put_u32_le(self.time_boot_ms);
9917 __tmp.put_f32_le(self.max);
9918 __tmp.put_f32_le(self.max_point_x);
9919 __tmp.put_f32_le(self.max_point_y);
9920 __tmp.put_f32_le(self.min);
9921 __tmp.put_f32_le(self.min_point_x);
9922 __tmp.put_f32_le(self.min_point_y);
9923 __tmp.put_u8(self.stream_id);
9924 __tmp.put_u8(self.camera_device_id);
9925 if matches!(version, MavlinkVersion::V2) {
9926 let len = __tmp.len();
9927 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9928 } else {
9929 __tmp.len()
9930 }
9931 }
9932}
9933#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
9934#[doc = ""]
9935#[doc = "ID: 276"]
9936#[derive(Debug, Clone, PartialEq)]
9937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9939#[cfg_attr(feature = "ts", derive(TS))]
9940#[cfg_attr(feature = "ts", ts(export))]
9941pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
9942 #[doc = "Latitude of tracked object"]
9943 pub lat: i32,
9944 #[doc = "Longitude of tracked object"]
9945 pub lon: i32,
9946 #[doc = "Altitude of tracked object(AMSL, WGS84)"]
9947 pub alt: f32,
9948 #[doc = "Horizontal accuracy. NAN if unknown"]
9949 pub h_acc: f32,
9950 #[doc = "Vertical accuracy. NAN if unknown"]
9951 pub v_acc: f32,
9952 #[doc = "North velocity of tracked object. NAN if unknown"]
9953 pub vel_n: f32,
9954 #[doc = "East velocity of tracked object. NAN if unknown"]
9955 pub vel_e: f32,
9956 #[doc = "Down velocity of tracked object. NAN if unknown"]
9957 pub vel_d: f32,
9958 #[doc = "Velocity accuracy. NAN if unknown"]
9959 pub vel_acc: f32,
9960 #[doc = "Distance between camera and tracked object. NAN if unknown"]
9961 pub dist: f32,
9962 #[doc = "Heading in radians, in NED. NAN if unknown"]
9963 pub hdg: f32,
9964 #[doc = "Accuracy of heading, in NED. NAN if unknown"]
9965 pub hdg_acc: f32,
9966 #[doc = "Current tracking status"]
9967 pub tracking_status: CameraTrackingStatusFlags,
9968 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
9969 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9970 pub camera_device_id: u8,
9971}
9972impl CAMERA_TRACKING_GEO_STATUS_DATA {
9973 pub const ENCODED_LEN: usize = 50usize;
9974 pub const DEFAULT: Self = Self {
9975 lat: 0_i32,
9976 lon: 0_i32,
9977 alt: 0.0_f32,
9978 h_acc: 0.0_f32,
9979 v_acc: 0.0_f32,
9980 vel_n: 0.0_f32,
9981 vel_e: 0.0_f32,
9982 vel_d: 0.0_f32,
9983 vel_acc: 0.0_f32,
9984 dist: 0.0_f32,
9985 hdg: 0.0_f32,
9986 hdg_acc: 0.0_f32,
9987 tracking_status: CameraTrackingStatusFlags::DEFAULT,
9988 camera_device_id: 0_u8,
9989 };
9990 #[cfg(feature = "arbitrary")]
9991 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9992 use arbitrary::{Arbitrary, Unstructured};
9993 let mut buf = [0u8; 1024];
9994 rng.fill_bytes(&mut buf);
9995 let mut unstructured = Unstructured::new(&buf);
9996 Self::arbitrary(&mut unstructured).unwrap_or_default()
9997 }
9998}
9999impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
10000 fn default() -> Self {
10001 Self::DEFAULT.clone()
10002 }
10003}
10004impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
10005 type Message = MavMessage;
10006 const ID: u32 = 276u32;
10007 const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
10008 const EXTRA_CRC: u8 = 18u8;
10009 const ENCODED_LEN: usize = 50usize;
10010 fn deser(
10011 _version: MavlinkVersion,
10012 __input: &[u8],
10013 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10014 let avail_len = __input.len();
10015 let mut payload_buf = [0; Self::ENCODED_LEN];
10016 let mut buf = if avail_len < Self::ENCODED_LEN {
10017 payload_buf[0..avail_len].copy_from_slice(__input);
10018 Bytes::new(&payload_buf)
10019 } else {
10020 Bytes::new(__input)
10021 };
10022 let mut __struct = Self::default();
10023 __struct.lat = buf.get_i32_le()?;
10024 __struct.lon = buf.get_i32_le()?;
10025 __struct.alt = buf.get_f32_le()?;
10026 __struct.h_acc = buf.get_f32_le()?;
10027 __struct.v_acc = buf.get_f32_le()?;
10028 __struct.vel_n = buf.get_f32_le()?;
10029 __struct.vel_e = buf.get_f32_le()?;
10030 __struct.vel_d = buf.get_f32_le()?;
10031 __struct.vel_acc = buf.get_f32_le()?;
10032 __struct.dist = buf.get_f32_le()?;
10033 __struct.hdg = buf.get_f32_le()?;
10034 __struct.hdg_acc = buf.get_f32_le()?;
10035 let tmp = buf.get_u8()?;
10036 __struct.tracking_status =
10037 CameraTrackingStatusFlags::from_bits(tmp as <CameraTrackingStatusFlags as Flags>::Bits)
10038 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10039 flag_type: "CameraTrackingStatusFlags",
10040 value: tmp as u64,
10041 })?;
10042 __struct.camera_device_id = buf.get_u8()?;
10043 Ok(__struct)
10044 }
10045 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10046 let mut __tmp = BytesMut::new(bytes);
10047 #[allow(clippy::absurd_extreme_comparisons)]
10048 #[allow(unused_comparisons)]
10049 if __tmp.remaining() < Self::ENCODED_LEN {
10050 panic!(
10051 "buffer is too small (need {} bytes, but got {})",
10052 Self::ENCODED_LEN,
10053 __tmp.remaining(),
10054 )
10055 }
10056 __tmp.put_i32_le(self.lat);
10057 __tmp.put_i32_le(self.lon);
10058 __tmp.put_f32_le(self.alt);
10059 __tmp.put_f32_le(self.h_acc);
10060 __tmp.put_f32_le(self.v_acc);
10061 __tmp.put_f32_le(self.vel_n);
10062 __tmp.put_f32_le(self.vel_e);
10063 __tmp.put_f32_le(self.vel_d);
10064 __tmp.put_f32_le(self.vel_acc);
10065 __tmp.put_f32_le(self.dist);
10066 __tmp.put_f32_le(self.hdg);
10067 __tmp.put_f32_le(self.hdg_acc);
10068 __tmp.put_u8(self.tracking_status.bits() as u8);
10069 if matches!(version, MavlinkVersion::V2) {
10070 __tmp.put_u8(self.camera_device_id);
10071 let len = __tmp.len();
10072 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10073 } else {
10074 __tmp.len()
10075 }
10076 }
10077}
10078#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
10079#[doc = ""]
10080#[doc = "ID: 275"]
10081#[derive(Debug, Clone, PartialEq)]
10082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10084#[cfg_attr(feature = "ts", derive(TS))]
10085#[cfg_attr(feature = "ts", ts(export))]
10086pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
10087 #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
10088 pub point_x: f32,
10089 #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
10090 pub point_y: f32,
10091 #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
10092 pub radius: f32,
10093 #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
10094 pub rec_top_x: f32,
10095 #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
10096 pub rec_top_y: f32,
10097 #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
10098 pub rec_bottom_x: f32,
10099 #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
10100 pub rec_bottom_y: f32,
10101 #[doc = "Current tracking status"]
10102 pub tracking_status: CameraTrackingStatusFlags,
10103 #[doc = "Current tracking mode"]
10104 pub tracking_mode: CameraTrackingMode,
10105 #[doc = "Defines location of target data"]
10106 pub target_data: CameraTrackingTargetData,
10107 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
10108 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10109 pub camera_device_id: u8,
10110}
10111impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
10112 pub const ENCODED_LEN: usize = 32usize;
10113 pub const DEFAULT: Self = Self {
10114 point_x: 0.0_f32,
10115 point_y: 0.0_f32,
10116 radius: 0.0_f32,
10117 rec_top_x: 0.0_f32,
10118 rec_top_y: 0.0_f32,
10119 rec_bottom_x: 0.0_f32,
10120 rec_bottom_y: 0.0_f32,
10121 tracking_status: CameraTrackingStatusFlags::DEFAULT,
10122 tracking_mode: CameraTrackingMode::DEFAULT,
10123 target_data: CameraTrackingTargetData::DEFAULT,
10124 camera_device_id: 0_u8,
10125 };
10126 #[cfg(feature = "arbitrary")]
10127 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10128 use arbitrary::{Arbitrary, Unstructured};
10129 let mut buf = [0u8; 1024];
10130 rng.fill_bytes(&mut buf);
10131 let mut unstructured = Unstructured::new(&buf);
10132 Self::arbitrary(&mut unstructured).unwrap_or_default()
10133 }
10134}
10135impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
10136 fn default() -> Self {
10137 Self::DEFAULT.clone()
10138 }
10139}
10140impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
10141 type Message = MavMessage;
10142 const ID: u32 = 275u32;
10143 const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
10144 const EXTRA_CRC: u8 = 126u8;
10145 const ENCODED_LEN: usize = 32usize;
10146 fn deser(
10147 _version: MavlinkVersion,
10148 __input: &[u8],
10149 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10150 let avail_len = __input.len();
10151 let mut payload_buf = [0; Self::ENCODED_LEN];
10152 let mut buf = if avail_len < Self::ENCODED_LEN {
10153 payload_buf[0..avail_len].copy_from_slice(__input);
10154 Bytes::new(&payload_buf)
10155 } else {
10156 Bytes::new(__input)
10157 };
10158 let mut __struct = Self::default();
10159 __struct.point_x = buf.get_f32_le()?;
10160 __struct.point_y = buf.get_f32_le()?;
10161 __struct.radius = buf.get_f32_le()?;
10162 __struct.rec_top_x = buf.get_f32_le()?;
10163 __struct.rec_top_y = buf.get_f32_le()?;
10164 __struct.rec_bottom_x = buf.get_f32_le()?;
10165 __struct.rec_bottom_y = buf.get_f32_le()?;
10166 let tmp = buf.get_u8()?;
10167 __struct.tracking_status =
10168 CameraTrackingStatusFlags::from_bits(tmp as <CameraTrackingStatusFlags as Flags>::Bits)
10169 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10170 flag_type: "CameraTrackingStatusFlags",
10171 value: tmp as u64,
10172 })?;
10173 let tmp = buf.get_u8()?;
10174 __struct.tracking_mode =
10175 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10176 enum_type: "CameraTrackingMode",
10177 value: tmp as u64,
10178 })?;
10179 let tmp = buf.get_u8()?;
10180 __struct.target_data =
10181 CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
10182 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10183 flag_type: "CameraTrackingTargetData",
10184 value: tmp as u64,
10185 })?;
10186 __struct.camera_device_id = buf.get_u8()?;
10187 Ok(__struct)
10188 }
10189 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10190 let mut __tmp = BytesMut::new(bytes);
10191 #[allow(clippy::absurd_extreme_comparisons)]
10192 #[allow(unused_comparisons)]
10193 if __tmp.remaining() < Self::ENCODED_LEN {
10194 panic!(
10195 "buffer is too small (need {} bytes, but got {})",
10196 Self::ENCODED_LEN,
10197 __tmp.remaining(),
10198 )
10199 }
10200 __tmp.put_f32_le(self.point_x);
10201 __tmp.put_f32_le(self.point_y);
10202 __tmp.put_f32_le(self.radius);
10203 __tmp.put_f32_le(self.rec_top_x);
10204 __tmp.put_f32_le(self.rec_top_y);
10205 __tmp.put_f32_le(self.rec_bottom_x);
10206 __tmp.put_f32_le(self.rec_bottom_y);
10207 __tmp.put_u8(self.tracking_status.bits() as u8);
10208 __tmp.put_u8(self.tracking_mode as u8);
10209 __tmp.put_u8(self.target_data.bits() as u8);
10210 if matches!(version, MavlinkVersion::V2) {
10211 __tmp.put_u8(self.camera_device_id);
10212 let len = __tmp.len();
10213 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10214 } else {
10215 __tmp.len()
10216 }
10217 }
10218}
10219#[doc = "Camera-IMU triggering and synchronisation message."]
10220#[doc = ""]
10221#[doc = "ID: 112"]
10222#[derive(Debug, Clone, PartialEq)]
10223#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10224#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10225#[cfg_attr(feature = "ts", derive(TS))]
10226#[cfg_attr(feature = "ts", ts(export))]
10227pub struct CAMERA_TRIGGER_DATA {
10228 #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10229 pub time_usec: u64,
10230 #[doc = "Image frame sequence"]
10231 pub seq: u32,
10232}
10233impl CAMERA_TRIGGER_DATA {
10234 pub const ENCODED_LEN: usize = 12usize;
10235 pub const DEFAULT: Self = Self {
10236 time_usec: 0_u64,
10237 seq: 0_u32,
10238 };
10239 #[cfg(feature = "arbitrary")]
10240 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10241 use arbitrary::{Arbitrary, Unstructured};
10242 let mut buf = [0u8; 1024];
10243 rng.fill_bytes(&mut buf);
10244 let mut unstructured = Unstructured::new(&buf);
10245 Self::arbitrary(&mut unstructured).unwrap_or_default()
10246 }
10247}
10248impl Default for CAMERA_TRIGGER_DATA {
10249 fn default() -> Self {
10250 Self::DEFAULT.clone()
10251 }
10252}
10253impl MessageData for CAMERA_TRIGGER_DATA {
10254 type Message = MavMessage;
10255 const ID: u32 = 112u32;
10256 const NAME: &'static str = "CAMERA_TRIGGER";
10257 const EXTRA_CRC: u8 = 174u8;
10258 const ENCODED_LEN: usize = 12usize;
10259 fn deser(
10260 _version: MavlinkVersion,
10261 __input: &[u8],
10262 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10263 let avail_len = __input.len();
10264 let mut payload_buf = [0; Self::ENCODED_LEN];
10265 let mut buf = if avail_len < Self::ENCODED_LEN {
10266 payload_buf[0..avail_len].copy_from_slice(__input);
10267 Bytes::new(&payload_buf)
10268 } else {
10269 Bytes::new(__input)
10270 };
10271 let mut __struct = Self::default();
10272 __struct.time_usec = buf.get_u64_le()?;
10273 __struct.seq = buf.get_u32_le()?;
10274 Ok(__struct)
10275 }
10276 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10277 let mut __tmp = BytesMut::new(bytes);
10278 #[allow(clippy::absurd_extreme_comparisons)]
10279 #[allow(unused_comparisons)]
10280 if __tmp.remaining() < Self::ENCODED_LEN {
10281 panic!(
10282 "buffer is too small (need {} bytes, but got {})",
10283 Self::ENCODED_LEN,
10284 __tmp.remaining(),
10285 )
10286 }
10287 __tmp.put_u64_le(self.time_usec);
10288 __tmp.put_u32_le(self.seq);
10289 if matches!(version, MavlinkVersion::V2) {
10290 let len = __tmp.len();
10291 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10292 } else {
10293 __tmp.len()
10294 }
10295 }
10296}
10297#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
10298#[doc = ""]
10299#[doc = "ID: 387"]
10300#[derive(Debug, Clone, PartialEq)]
10301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10303#[cfg_attr(feature = "ts", derive(TS))]
10304#[cfg_attr(feature = "ts", ts(export))]
10305pub struct CANFD_FRAME_DATA {
10306 #[doc = "Frame ID"]
10307 pub id: u32,
10308 #[doc = "System ID."]
10309 pub target_system: u8,
10310 #[doc = "Component ID."]
10311 pub target_component: u8,
10312 #[doc = "bus number"]
10313 pub bus: u8,
10314 #[doc = "Frame length"]
10315 pub len: u8,
10316 #[doc = "Frame data"]
10317 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10318 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10319 pub data: [u8; 64],
10320}
10321impl CANFD_FRAME_DATA {
10322 pub const ENCODED_LEN: usize = 72usize;
10323 pub const DEFAULT: Self = Self {
10324 id: 0_u32,
10325 target_system: 0_u8,
10326 target_component: 0_u8,
10327 bus: 0_u8,
10328 len: 0_u8,
10329 data: [0_u8; 64usize],
10330 };
10331 #[cfg(feature = "arbitrary")]
10332 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10333 use arbitrary::{Arbitrary, Unstructured};
10334 let mut buf = [0u8; 1024];
10335 rng.fill_bytes(&mut buf);
10336 let mut unstructured = Unstructured::new(&buf);
10337 Self::arbitrary(&mut unstructured).unwrap_or_default()
10338 }
10339}
10340impl Default for CANFD_FRAME_DATA {
10341 fn default() -> Self {
10342 Self::DEFAULT.clone()
10343 }
10344}
10345impl MessageData for CANFD_FRAME_DATA {
10346 type Message = MavMessage;
10347 const ID: u32 = 387u32;
10348 const NAME: &'static str = "CANFD_FRAME";
10349 const EXTRA_CRC: u8 = 4u8;
10350 const ENCODED_LEN: usize = 72usize;
10351 fn deser(
10352 _version: MavlinkVersion,
10353 __input: &[u8],
10354 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10355 let avail_len = __input.len();
10356 let mut payload_buf = [0; Self::ENCODED_LEN];
10357 let mut buf = if avail_len < Self::ENCODED_LEN {
10358 payload_buf[0..avail_len].copy_from_slice(__input);
10359 Bytes::new(&payload_buf)
10360 } else {
10361 Bytes::new(__input)
10362 };
10363 let mut __struct = Self::default();
10364 __struct.id = buf.get_u32_le()?;
10365 __struct.target_system = buf.get_u8()?;
10366 __struct.target_component = buf.get_u8()?;
10367 __struct.bus = buf.get_u8()?;
10368 __struct.len = buf.get_u8()?;
10369 for v in &mut __struct.data {
10370 let val = buf.get_u8()?;
10371 *v = val;
10372 }
10373 Ok(__struct)
10374 }
10375 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10376 let mut __tmp = BytesMut::new(bytes);
10377 #[allow(clippy::absurd_extreme_comparisons)]
10378 #[allow(unused_comparisons)]
10379 if __tmp.remaining() < Self::ENCODED_LEN {
10380 panic!(
10381 "buffer is too small (need {} bytes, but got {})",
10382 Self::ENCODED_LEN,
10383 __tmp.remaining(),
10384 )
10385 }
10386 __tmp.put_u32_le(self.id);
10387 __tmp.put_u8(self.target_system);
10388 __tmp.put_u8(self.target_component);
10389 __tmp.put_u8(self.bus);
10390 __tmp.put_u8(self.len);
10391 for val in &self.data {
10392 __tmp.put_u8(*val);
10393 }
10394 if matches!(version, MavlinkVersion::V2) {
10395 let len = __tmp.len();
10396 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10397 } else {
10398 __tmp.len()
10399 }
10400 }
10401}
10402#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
10403#[doc = ""]
10404#[doc = "ID: 388"]
10405#[derive(Debug, Clone, PartialEq)]
10406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10408#[cfg_attr(feature = "ts", derive(TS))]
10409#[cfg_attr(feature = "ts", ts(export))]
10410pub struct CAN_FILTER_MODIFY_DATA {
10411 #[doc = "filter IDs, length num_ids"]
10412 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10413 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10414 pub ids: [u16; 16],
10415 #[doc = "System ID."]
10416 pub target_system: u8,
10417 #[doc = "Component ID."]
10418 pub target_component: u8,
10419 #[doc = "bus number"]
10420 pub bus: u8,
10421 #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
10422 pub operation: CanFilterOp,
10423 #[doc = "number of IDs in filter list"]
10424 pub num_ids: u8,
10425}
10426impl CAN_FILTER_MODIFY_DATA {
10427 pub const ENCODED_LEN: usize = 37usize;
10428 pub const DEFAULT: Self = Self {
10429 ids: [0_u16; 16usize],
10430 target_system: 0_u8,
10431 target_component: 0_u8,
10432 bus: 0_u8,
10433 operation: CanFilterOp::DEFAULT,
10434 num_ids: 0_u8,
10435 };
10436 #[cfg(feature = "arbitrary")]
10437 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10438 use arbitrary::{Arbitrary, Unstructured};
10439 let mut buf = [0u8; 1024];
10440 rng.fill_bytes(&mut buf);
10441 let mut unstructured = Unstructured::new(&buf);
10442 Self::arbitrary(&mut unstructured).unwrap_or_default()
10443 }
10444}
10445impl Default for CAN_FILTER_MODIFY_DATA {
10446 fn default() -> Self {
10447 Self::DEFAULT.clone()
10448 }
10449}
10450impl MessageData for CAN_FILTER_MODIFY_DATA {
10451 type Message = MavMessage;
10452 const ID: u32 = 388u32;
10453 const NAME: &'static str = "CAN_FILTER_MODIFY";
10454 const EXTRA_CRC: u8 = 8u8;
10455 const ENCODED_LEN: usize = 37usize;
10456 fn deser(
10457 _version: MavlinkVersion,
10458 __input: &[u8],
10459 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10460 let avail_len = __input.len();
10461 let mut payload_buf = [0; Self::ENCODED_LEN];
10462 let mut buf = if avail_len < Self::ENCODED_LEN {
10463 payload_buf[0..avail_len].copy_from_slice(__input);
10464 Bytes::new(&payload_buf)
10465 } else {
10466 Bytes::new(__input)
10467 };
10468 let mut __struct = Self::default();
10469 for v in &mut __struct.ids {
10470 let val = buf.get_u16_le()?;
10471 *v = val;
10472 }
10473 __struct.target_system = buf.get_u8()?;
10474 __struct.target_component = buf.get_u8()?;
10475 __struct.bus = buf.get_u8()?;
10476 let tmp = buf.get_u8()?;
10477 __struct.operation =
10478 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10479 enum_type: "CanFilterOp",
10480 value: tmp as u64,
10481 })?;
10482 __struct.num_ids = buf.get_u8()?;
10483 Ok(__struct)
10484 }
10485 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10486 let mut __tmp = BytesMut::new(bytes);
10487 #[allow(clippy::absurd_extreme_comparisons)]
10488 #[allow(unused_comparisons)]
10489 if __tmp.remaining() < Self::ENCODED_LEN {
10490 panic!(
10491 "buffer is too small (need {} bytes, but got {})",
10492 Self::ENCODED_LEN,
10493 __tmp.remaining(),
10494 )
10495 }
10496 for val in &self.ids {
10497 __tmp.put_u16_le(*val);
10498 }
10499 __tmp.put_u8(self.target_system);
10500 __tmp.put_u8(self.target_component);
10501 __tmp.put_u8(self.bus);
10502 __tmp.put_u8(self.operation as u8);
10503 __tmp.put_u8(self.num_ids);
10504 if matches!(version, MavlinkVersion::V2) {
10505 let len = __tmp.len();
10506 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10507 } else {
10508 __tmp.len()
10509 }
10510 }
10511}
10512#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
10513#[doc = ""]
10514#[doc = "ID: 386"]
10515#[derive(Debug, Clone, PartialEq)]
10516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10518#[cfg_attr(feature = "ts", derive(TS))]
10519#[cfg_attr(feature = "ts", ts(export))]
10520pub struct CAN_FRAME_DATA {
10521 #[doc = "Frame ID"]
10522 pub id: u32,
10523 #[doc = "System ID."]
10524 pub target_system: u8,
10525 #[doc = "Component ID."]
10526 pub target_component: u8,
10527 #[doc = "Bus number"]
10528 pub bus: u8,
10529 #[doc = "Frame length"]
10530 pub len: u8,
10531 #[doc = "Frame data"]
10532 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10533 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10534 pub data: [u8; 8],
10535}
10536impl CAN_FRAME_DATA {
10537 pub const ENCODED_LEN: usize = 16usize;
10538 pub const DEFAULT: Self = Self {
10539 id: 0_u32,
10540 target_system: 0_u8,
10541 target_component: 0_u8,
10542 bus: 0_u8,
10543 len: 0_u8,
10544 data: [0_u8; 8usize],
10545 };
10546 #[cfg(feature = "arbitrary")]
10547 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10548 use arbitrary::{Arbitrary, Unstructured};
10549 let mut buf = [0u8; 1024];
10550 rng.fill_bytes(&mut buf);
10551 let mut unstructured = Unstructured::new(&buf);
10552 Self::arbitrary(&mut unstructured).unwrap_or_default()
10553 }
10554}
10555impl Default for CAN_FRAME_DATA {
10556 fn default() -> Self {
10557 Self::DEFAULT.clone()
10558 }
10559}
10560impl MessageData for CAN_FRAME_DATA {
10561 type Message = MavMessage;
10562 const ID: u32 = 386u32;
10563 const NAME: &'static str = "CAN_FRAME";
10564 const EXTRA_CRC: u8 = 132u8;
10565 const ENCODED_LEN: usize = 16usize;
10566 fn deser(
10567 _version: MavlinkVersion,
10568 __input: &[u8],
10569 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10570 let avail_len = __input.len();
10571 let mut payload_buf = [0; Self::ENCODED_LEN];
10572 let mut buf = if avail_len < Self::ENCODED_LEN {
10573 payload_buf[0..avail_len].copy_from_slice(__input);
10574 Bytes::new(&payload_buf)
10575 } else {
10576 Bytes::new(__input)
10577 };
10578 let mut __struct = Self::default();
10579 __struct.id = buf.get_u32_le()?;
10580 __struct.target_system = buf.get_u8()?;
10581 __struct.target_component = buf.get_u8()?;
10582 __struct.bus = buf.get_u8()?;
10583 __struct.len = buf.get_u8()?;
10584 for v in &mut __struct.data {
10585 let val = buf.get_u8()?;
10586 *v = val;
10587 }
10588 Ok(__struct)
10589 }
10590 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10591 let mut __tmp = BytesMut::new(bytes);
10592 #[allow(clippy::absurd_extreme_comparisons)]
10593 #[allow(unused_comparisons)]
10594 if __tmp.remaining() < Self::ENCODED_LEN {
10595 panic!(
10596 "buffer is too small (need {} bytes, but got {})",
10597 Self::ENCODED_LEN,
10598 __tmp.remaining(),
10599 )
10600 }
10601 __tmp.put_u32_le(self.id);
10602 __tmp.put_u8(self.target_system);
10603 __tmp.put_u8(self.target_component);
10604 __tmp.put_u8(self.bus);
10605 __tmp.put_u8(self.len);
10606 for val in &self.data {
10607 __tmp.put_u8(*val);
10608 }
10609 if matches!(version, MavlinkVersion::V2) {
10610 let len = __tmp.len();
10611 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10612 } else {
10613 __tmp.len()
10614 }
10615 }
10616}
10617#[doc = "Configure cellular modems. This message is re-emitted as an acknowledgement by the modem. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
10618#[doc = ""]
10619#[doc = "ID: 336"]
10620#[derive(Debug, Clone, PartialEq)]
10621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10623#[cfg_attr(feature = "ts", derive(TS))]
10624#[cfg_attr(feature = "ts", ts(export))]
10625pub struct CELLULAR_CONFIG_DATA {
10626 #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
10627 pub enable_lte: u8,
10628 #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
10629 pub enable_pin: u8,
10630 #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
10631 #[cfg_attr(feature = "ts", ts(type = "string"))]
10632 pub pin: CharArray<16>,
10633 #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
10634 #[cfg_attr(feature = "ts", ts(type = "string"))]
10635 pub new_pin: CharArray<16>,
10636 #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
10637 #[cfg_attr(feature = "ts", ts(type = "string"))]
10638 pub apn: CharArray<32>,
10639 #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
10640 #[cfg_attr(feature = "ts", ts(type = "string"))]
10641 pub puk: CharArray<16>,
10642 #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
10643 pub roaming: u8,
10644 #[doc = "Message acceptance response (sent back to GS)."]
10645 pub response: CellularConfigResponse,
10646}
10647impl CELLULAR_CONFIG_DATA {
10648 pub const ENCODED_LEN: usize = 84usize;
10649 pub const DEFAULT: Self = Self {
10650 enable_lte: 0_u8,
10651 enable_pin: 0_u8,
10652 pin: CharArray::new([0_u8; 16usize]),
10653 new_pin: CharArray::new([0_u8; 16usize]),
10654 apn: CharArray::new([0_u8; 32usize]),
10655 puk: CharArray::new([0_u8; 16usize]),
10656 roaming: 0_u8,
10657 response: CellularConfigResponse::DEFAULT,
10658 };
10659 #[cfg(feature = "arbitrary")]
10660 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10661 use arbitrary::{Arbitrary, Unstructured};
10662 let mut buf = [0u8; 1024];
10663 rng.fill_bytes(&mut buf);
10664 let mut unstructured = Unstructured::new(&buf);
10665 Self::arbitrary(&mut unstructured).unwrap_or_default()
10666 }
10667}
10668impl Default for CELLULAR_CONFIG_DATA {
10669 fn default() -> Self {
10670 Self::DEFAULT.clone()
10671 }
10672}
10673impl MessageData for CELLULAR_CONFIG_DATA {
10674 type Message = MavMessage;
10675 const ID: u32 = 336u32;
10676 const NAME: &'static str = "CELLULAR_CONFIG";
10677 const EXTRA_CRC: u8 = 245u8;
10678 const ENCODED_LEN: usize = 84usize;
10679 fn deser(
10680 _version: MavlinkVersion,
10681 __input: &[u8],
10682 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10683 let avail_len = __input.len();
10684 let mut payload_buf = [0; Self::ENCODED_LEN];
10685 let mut buf = if avail_len < Self::ENCODED_LEN {
10686 payload_buf[0..avail_len].copy_from_slice(__input);
10687 Bytes::new(&payload_buf)
10688 } else {
10689 Bytes::new(__input)
10690 };
10691 let mut __struct = Self::default();
10692 __struct.enable_lte = buf.get_u8()?;
10693 __struct.enable_pin = buf.get_u8()?;
10694 let mut tmp = [0_u8; 16usize];
10695 for v in &mut tmp {
10696 *v = buf.get_u8()?;
10697 }
10698 __struct.pin = CharArray::new(tmp);
10699 let mut tmp = [0_u8; 16usize];
10700 for v in &mut tmp {
10701 *v = buf.get_u8()?;
10702 }
10703 __struct.new_pin = CharArray::new(tmp);
10704 let mut tmp = [0_u8; 32usize];
10705 for v in &mut tmp {
10706 *v = buf.get_u8()?;
10707 }
10708 __struct.apn = CharArray::new(tmp);
10709 let mut tmp = [0_u8; 16usize];
10710 for v in &mut tmp {
10711 *v = buf.get_u8()?;
10712 }
10713 __struct.puk = CharArray::new(tmp);
10714 __struct.roaming = buf.get_u8()?;
10715 let tmp = buf.get_u8()?;
10716 __struct.response =
10717 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10718 enum_type: "CellularConfigResponse",
10719 value: tmp as u64,
10720 })?;
10721 Ok(__struct)
10722 }
10723 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10724 let mut __tmp = BytesMut::new(bytes);
10725 #[allow(clippy::absurd_extreme_comparisons)]
10726 #[allow(unused_comparisons)]
10727 if __tmp.remaining() < Self::ENCODED_LEN {
10728 panic!(
10729 "buffer is too small (need {} bytes, but got {})",
10730 Self::ENCODED_LEN,
10731 __tmp.remaining(),
10732 )
10733 }
10734 __tmp.put_u8(self.enable_lte);
10735 __tmp.put_u8(self.enable_pin);
10736 for val in &self.pin {
10737 __tmp.put_u8(*val);
10738 }
10739 for val in &self.new_pin {
10740 __tmp.put_u8(*val);
10741 }
10742 for val in &self.apn {
10743 __tmp.put_u8(*val);
10744 }
10745 for val in &self.puk {
10746 __tmp.put_u8(*val);
10747 }
10748 __tmp.put_u8(self.roaming);
10749 __tmp.put_u8(self.response as u8);
10750 if matches!(version, MavlinkVersion::V2) {
10751 let len = __tmp.len();
10752 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10753 } else {
10754 __tmp.len()
10755 }
10756 }
10757}
10758#[doc = "Report current used cellular network status."]
10759#[doc = ""]
10760#[doc = "ID: 334"]
10761#[derive(Debug, Clone, PartialEq)]
10762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10764#[cfg_attr(feature = "ts", derive(TS))]
10765#[cfg_attr(feature = "ts", ts(export))]
10766pub struct CELLULAR_STATUS_DATA {
10767 #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
10768 pub mcc: u16,
10769 #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
10770 pub mnc: u16,
10771 #[doc = "Location area code. If unknown, set to 0"]
10772 pub lac: u16,
10773 #[doc = "Cellular modem status"]
10774 pub status: CellularStatusFlag,
10775 #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
10776 pub failure_reason: CellularNetworkFailedReason,
10777 #[doc = "Cellular network radio type: gsm, cdma, lte..."]
10778 pub mavtype: CellularNetworkRadioType,
10779 #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
10780 pub quality: u8,
10781}
10782impl CELLULAR_STATUS_DATA {
10783 pub const ENCODED_LEN: usize = 10usize;
10784 pub const DEFAULT: Self = Self {
10785 mcc: 0_u16,
10786 mnc: 0_u16,
10787 lac: 0_u16,
10788 status: CellularStatusFlag::DEFAULT,
10789 failure_reason: CellularNetworkFailedReason::DEFAULT,
10790 mavtype: CellularNetworkRadioType::DEFAULT,
10791 quality: 0_u8,
10792 };
10793 #[cfg(feature = "arbitrary")]
10794 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10795 use arbitrary::{Arbitrary, Unstructured};
10796 let mut buf = [0u8; 1024];
10797 rng.fill_bytes(&mut buf);
10798 let mut unstructured = Unstructured::new(&buf);
10799 Self::arbitrary(&mut unstructured).unwrap_or_default()
10800 }
10801}
10802impl Default for CELLULAR_STATUS_DATA {
10803 fn default() -> Self {
10804 Self::DEFAULT.clone()
10805 }
10806}
10807impl MessageData for CELLULAR_STATUS_DATA {
10808 type Message = MavMessage;
10809 const ID: u32 = 334u32;
10810 const NAME: &'static str = "CELLULAR_STATUS";
10811 const EXTRA_CRC: u8 = 72u8;
10812 const ENCODED_LEN: usize = 10usize;
10813 fn deser(
10814 _version: MavlinkVersion,
10815 __input: &[u8],
10816 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10817 let avail_len = __input.len();
10818 let mut payload_buf = [0; Self::ENCODED_LEN];
10819 let mut buf = if avail_len < Self::ENCODED_LEN {
10820 payload_buf[0..avail_len].copy_from_slice(__input);
10821 Bytes::new(&payload_buf)
10822 } else {
10823 Bytes::new(__input)
10824 };
10825 let mut __struct = Self::default();
10826 __struct.mcc = buf.get_u16_le()?;
10827 __struct.mnc = buf.get_u16_le()?;
10828 __struct.lac = buf.get_u16_le()?;
10829 let tmp = buf.get_u8()?;
10830 __struct.status =
10831 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10832 enum_type: "CellularStatusFlag",
10833 value: tmp as u64,
10834 })?;
10835 let tmp = buf.get_u8()?;
10836 __struct.failure_reason =
10837 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10838 enum_type: "CellularNetworkFailedReason",
10839 value: tmp as u64,
10840 })?;
10841 let tmp = buf.get_u8()?;
10842 __struct.mavtype =
10843 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10844 enum_type: "CellularNetworkRadioType",
10845 value: tmp as u64,
10846 })?;
10847 __struct.quality = buf.get_u8()?;
10848 Ok(__struct)
10849 }
10850 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10851 let mut __tmp = BytesMut::new(bytes);
10852 #[allow(clippy::absurd_extreme_comparisons)]
10853 #[allow(unused_comparisons)]
10854 if __tmp.remaining() < Self::ENCODED_LEN {
10855 panic!(
10856 "buffer is too small (need {} bytes, but got {})",
10857 Self::ENCODED_LEN,
10858 __tmp.remaining(),
10859 )
10860 }
10861 __tmp.put_u16_le(self.mcc);
10862 __tmp.put_u16_le(self.mnc);
10863 __tmp.put_u16_le(self.lac);
10864 __tmp.put_u8(self.status as u8);
10865 __tmp.put_u8(self.failure_reason as u8);
10866 __tmp.put_u8(self.mavtype as u8);
10867 __tmp.put_u8(self.quality);
10868 if matches!(version, MavlinkVersion::V2) {
10869 let len = __tmp.len();
10870 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10871 } else {
10872 __tmp.len()
10873 }
10874 }
10875}
10876#[doc = "Request to control this MAV."]
10877#[doc = ""]
10878#[doc = "ID: 5"]
10879#[derive(Debug, Clone, PartialEq)]
10880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10882#[cfg_attr(feature = "ts", derive(TS))]
10883#[cfg_attr(feature = "ts", ts(export))]
10884pub struct CHANGE_OPERATOR_CONTROL_DATA {
10885 #[doc = "System the GCS requests control for"]
10886 pub target_system: u8,
10887 #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
10888 pub control_request: u8,
10889 #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
10890 pub version: u8,
10891 #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
10892 #[cfg_attr(feature = "ts", ts(type = "string"))]
10893 pub passkey: CharArray<25>,
10894}
10895impl CHANGE_OPERATOR_CONTROL_DATA {
10896 pub const ENCODED_LEN: usize = 28usize;
10897 pub const DEFAULT: Self = Self {
10898 target_system: 0_u8,
10899 control_request: 0_u8,
10900 version: 0_u8,
10901 passkey: CharArray::new([0_u8; 25usize]),
10902 };
10903 #[cfg(feature = "arbitrary")]
10904 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10905 use arbitrary::{Arbitrary, Unstructured};
10906 let mut buf = [0u8; 1024];
10907 rng.fill_bytes(&mut buf);
10908 let mut unstructured = Unstructured::new(&buf);
10909 Self::arbitrary(&mut unstructured).unwrap_or_default()
10910 }
10911}
10912impl Default for CHANGE_OPERATOR_CONTROL_DATA {
10913 fn default() -> Self {
10914 Self::DEFAULT.clone()
10915 }
10916}
10917impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
10918 type Message = MavMessage;
10919 const ID: u32 = 5u32;
10920 const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
10921 const EXTRA_CRC: u8 = 217u8;
10922 const ENCODED_LEN: usize = 28usize;
10923 fn deser(
10924 _version: MavlinkVersion,
10925 __input: &[u8],
10926 ) -> Result<Self, ::mavlink_core::error::ParserError> {
10927 let avail_len = __input.len();
10928 let mut payload_buf = [0; Self::ENCODED_LEN];
10929 let mut buf = if avail_len < Self::ENCODED_LEN {
10930 payload_buf[0..avail_len].copy_from_slice(__input);
10931 Bytes::new(&payload_buf)
10932 } else {
10933 Bytes::new(__input)
10934 };
10935 let mut __struct = Self::default();
10936 __struct.target_system = buf.get_u8()?;
10937 __struct.control_request = buf.get_u8()?;
10938 __struct.version = buf.get_u8()?;
10939 let mut tmp = [0_u8; 25usize];
10940 for v in &mut tmp {
10941 *v = buf.get_u8()?;
10942 }
10943 __struct.passkey = CharArray::new(tmp);
10944 Ok(__struct)
10945 }
10946 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10947 let mut __tmp = BytesMut::new(bytes);
10948 #[allow(clippy::absurd_extreme_comparisons)]
10949 #[allow(unused_comparisons)]
10950 if __tmp.remaining() < Self::ENCODED_LEN {
10951 panic!(
10952 "buffer is too small (need {} bytes, but got {})",
10953 Self::ENCODED_LEN,
10954 __tmp.remaining(),
10955 )
10956 }
10957 __tmp.put_u8(self.target_system);
10958 __tmp.put_u8(self.control_request);
10959 __tmp.put_u8(self.version);
10960 for val in &self.passkey {
10961 __tmp.put_u8(*val);
10962 }
10963 if matches!(version, MavlinkVersion::V2) {
10964 let len = __tmp.len();
10965 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10966 } else {
10967 __tmp.len()
10968 }
10969 }
10970}
10971#[doc = "Accept / deny control of this MAV."]
10972#[doc = ""]
10973#[doc = "ID: 6"]
10974#[derive(Debug, Clone, PartialEq)]
10975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10977#[cfg_attr(feature = "ts", derive(TS))]
10978#[cfg_attr(feature = "ts", ts(export))]
10979pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
10980 #[doc = "ID of the GCS this message"]
10981 pub gcs_system_id: u8,
10982 #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
10983 pub control_request: u8,
10984 #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
10985 pub ack: u8,
10986}
10987impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
10988 pub const ENCODED_LEN: usize = 3usize;
10989 pub const DEFAULT: Self = Self {
10990 gcs_system_id: 0_u8,
10991 control_request: 0_u8,
10992 ack: 0_u8,
10993 };
10994 #[cfg(feature = "arbitrary")]
10995 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10996 use arbitrary::{Arbitrary, Unstructured};
10997 let mut buf = [0u8; 1024];
10998 rng.fill_bytes(&mut buf);
10999 let mut unstructured = Unstructured::new(&buf);
11000 Self::arbitrary(&mut unstructured).unwrap_or_default()
11001 }
11002}
11003impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
11004 fn default() -> Self {
11005 Self::DEFAULT.clone()
11006 }
11007}
11008impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
11009 type Message = MavMessage;
11010 const ID: u32 = 6u32;
11011 const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
11012 const EXTRA_CRC: u8 = 104u8;
11013 const ENCODED_LEN: usize = 3usize;
11014 fn deser(
11015 _version: MavlinkVersion,
11016 __input: &[u8],
11017 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11018 let avail_len = __input.len();
11019 let mut payload_buf = [0; Self::ENCODED_LEN];
11020 let mut buf = if avail_len < Self::ENCODED_LEN {
11021 payload_buf[0..avail_len].copy_from_slice(__input);
11022 Bytes::new(&payload_buf)
11023 } else {
11024 Bytes::new(__input)
11025 };
11026 let mut __struct = Self::default();
11027 __struct.gcs_system_id = buf.get_u8()?;
11028 __struct.control_request = buf.get_u8()?;
11029 __struct.ack = buf.get_u8()?;
11030 Ok(__struct)
11031 }
11032 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11033 let mut __tmp = BytesMut::new(bytes);
11034 #[allow(clippy::absurd_extreme_comparisons)]
11035 #[allow(unused_comparisons)]
11036 if __tmp.remaining() < Self::ENCODED_LEN {
11037 panic!(
11038 "buffer is too small (need {} bytes, but got {})",
11039 Self::ENCODED_LEN,
11040 __tmp.remaining(),
11041 )
11042 }
11043 __tmp.put_u8(self.gcs_system_id);
11044 __tmp.put_u8(self.control_request);
11045 __tmp.put_u8(self.ack);
11046 if matches!(version, MavlinkVersion::V2) {
11047 let len = __tmp.len();
11048 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11049 } else {
11050 __tmp.len()
11051 }
11052 }
11053}
11054#[doc = "Information about a potential collision."]
11055#[doc = ""]
11056#[doc = "ID: 247"]
11057#[derive(Debug, Clone, PartialEq)]
11058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11060#[cfg_attr(feature = "ts", derive(TS))]
11061#[cfg_attr(feature = "ts", ts(export))]
11062pub struct COLLISION_DATA {
11063 #[doc = "Unique identifier, domain based on src field"]
11064 pub id: u32,
11065 #[doc = "Estimated time until collision occurs"]
11066 pub time_to_minimum_delta: f32,
11067 #[doc = "Closest vertical distance between vehicle and object"]
11068 pub altitude_minimum_delta: f32,
11069 #[doc = "Closest horizontal distance between vehicle and object"]
11070 pub horizontal_minimum_delta: f32,
11071 #[doc = "Collision data source"]
11072 pub src: MavCollisionSrc,
11073 #[doc = "Action that is being taken to avoid this collision"]
11074 pub action: MavCollisionAction,
11075 #[doc = "How concerned the aircraft is about this collision"]
11076 pub threat_level: MavCollisionThreatLevel,
11077}
11078impl COLLISION_DATA {
11079 pub const ENCODED_LEN: usize = 19usize;
11080 pub const DEFAULT: Self = Self {
11081 id: 0_u32,
11082 time_to_minimum_delta: 0.0_f32,
11083 altitude_minimum_delta: 0.0_f32,
11084 horizontal_minimum_delta: 0.0_f32,
11085 src: MavCollisionSrc::DEFAULT,
11086 action: MavCollisionAction::DEFAULT,
11087 threat_level: MavCollisionThreatLevel::DEFAULT,
11088 };
11089 #[cfg(feature = "arbitrary")]
11090 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11091 use arbitrary::{Arbitrary, Unstructured};
11092 let mut buf = [0u8; 1024];
11093 rng.fill_bytes(&mut buf);
11094 let mut unstructured = Unstructured::new(&buf);
11095 Self::arbitrary(&mut unstructured).unwrap_or_default()
11096 }
11097}
11098impl Default for COLLISION_DATA {
11099 fn default() -> Self {
11100 Self::DEFAULT.clone()
11101 }
11102}
11103impl MessageData for COLLISION_DATA {
11104 type Message = MavMessage;
11105 const ID: u32 = 247u32;
11106 const NAME: &'static str = "COLLISION";
11107 const EXTRA_CRC: u8 = 81u8;
11108 const ENCODED_LEN: usize = 19usize;
11109 fn deser(
11110 _version: MavlinkVersion,
11111 __input: &[u8],
11112 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11113 let avail_len = __input.len();
11114 let mut payload_buf = [0; Self::ENCODED_LEN];
11115 let mut buf = if avail_len < Self::ENCODED_LEN {
11116 payload_buf[0..avail_len].copy_from_slice(__input);
11117 Bytes::new(&payload_buf)
11118 } else {
11119 Bytes::new(__input)
11120 };
11121 let mut __struct = Self::default();
11122 __struct.id = buf.get_u32_le()?;
11123 __struct.time_to_minimum_delta = buf.get_f32_le()?;
11124 __struct.altitude_minimum_delta = buf.get_f32_le()?;
11125 __struct.horizontal_minimum_delta = buf.get_f32_le()?;
11126 let tmp = buf.get_u8()?;
11127 __struct.src =
11128 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11129 enum_type: "MavCollisionSrc",
11130 value: tmp as u64,
11131 })?;
11132 let tmp = buf.get_u8()?;
11133 __struct.action =
11134 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11135 enum_type: "MavCollisionAction",
11136 value: tmp as u64,
11137 })?;
11138 let tmp = buf.get_u8()?;
11139 __struct.threat_level =
11140 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11141 enum_type: "MavCollisionThreatLevel",
11142 value: tmp as u64,
11143 })?;
11144 Ok(__struct)
11145 }
11146 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11147 let mut __tmp = BytesMut::new(bytes);
11148 #[allow(clippy::absurd_extreme_comparisons)]
11149 #[allow(unused_comparisons)]
11150 if __tmp.remaining() < Self::ENCODED_LEN {
11151 panic!(
11152 "buffer is too small (need {} bytes, but got {})",
11153 Self::ENCODED_LEN,
11154 __tmp.remaining(),
11155 )
11156 }
11157 __tmp.put_u32_le(self.id);
11158 __tmp.put_f32_le(self.time_to_minimum_delta);
11159 __tmp.put_f32_le(self.altitude_minimum_delta);
11160 __tmp.put_f32_le(self.horizontal_minimum_delta);
11161 __tmp.put_u8(self.src as u8);
11162 __tmp.put_u8(self.action as u8);
11163 __tmp.put_u8(self.threat_level as u8);
11164 if matches!(version, MavlinkVersion::V2) {
11165 let len = __tmp.len();
11166 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11167 } else {
11168 __tmp.len()
11169 }
11170 }
11171}
11172#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11173#[doc = ""]
11174#[doc = "ID: 77"]
11175#[derive(Debug, Clone, PartialEq)]
11176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11178#[cfg_attr(feature = "ts", derive(TS))]
11179#[cfg_attr(feature = "ts", ts(export))]
11180pub struct COMMAND_ACK_DATA {
11181 #[doc = "Command ID (of acknowledged command)."]
11182 pub command: MavCmd,
11183 #[doc = "Result of command."]
11184 pub result: MavResult,
11185 #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
11186 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11187 pub progress: u8,
11188 #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
11189 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11190 pub result_param2: i32,
11191 #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
11192 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11193 pub target_system: u8,
11194 #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
11195 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11196 pub target_component: u8,
11197}
11198impl COMMAND_ACK_DATA {
11199 pub const ENCODED_LEN: usize = 10usize;
11200 pub const DEFAULT: Self = Self {
11201 command: MavCmd::DEFAULT,
11202 result: MavResult::DEFAULT,
11203 progress: 0_u8,
11204 result_param2: 0_i32,
11205 target_system: 0_u8,
11206 target_component: 0_u8,
11207 };
11208 #[cfg(feature = "arbitrary")]
11209 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11210 use arbitrary::{Arbitrary, Unstructured};
11211 let mut buf = [0u8; 1024];
11212 rng.fill_bytes(&mut buf);
11213 let mut unstructured = Unstructured::new(&buf);
11214 Self::arbitrary(&mut unstructured).unwrap_or_default()
11215 }
11216}
11217impl Default for COMMAND_ACK_DATA {
11218 fn default() -> Self {
11219 Self::DEFAULT.clone()
11220 }
11221}
11222impl MessageData for COMMAND_ACK_DATA {
11223 type Message = MavMessage;
11224 const ID: u32 = 77u32;
11225 const NAME: &'static str = "COMMAND_ACK";
11226 const EXTRA_CRC: u8 = 143u8;
11227 const ENCODED_LEN: usize = 10usize;
11228 fn deser(
11229 _version: MavlinkVersion,
11230 __input: &[u8],
11231 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11232 let avail_len = __input.len();
11233 let mut payload_buf = [0; Self::ENCODED_LEN];
11234 let mut buf = if avail_len < Self::ENCODED_LEN {
11235 payload_buf[0..avail_len].copy_from_slice(__input);
11236 Bytes::new(&payload_buf)
11237 } else {
11238 Bytes::new(__input)
11239 };
11240 let mut __struct = Self::default();
11241 let tmp = buf.get_u16_le()?;
11242 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11243 ::mavlink_core::error::ParserError::InvalidEnum {
11244 enum_type: "MavCmd",
11245 value: tmp as u64,
11246 },
11247 )?;
11248 let tmp = buf.get_u8()?;
11249 __struct.result =
11250 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11251 enum_type: "MavResult",
11252 value: tmp as u64,
11253 })?;
11254 __struct.progress = buf.get_u8()?;
11255 __struct.result_param2 = buf.get_i32_le()?;
11256 __struct.target_system = buf.get_u8()?;
11257 __struct.target_component = buf.get_u8()?;
11258 Ok(__struct)
11259 }
11260 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11261 let mut __tmp = BytesMut::new(bytes);
11262 #[allow(clippy::absurd_extreme_comparisons)]
11263 #[allow(unused_comparisons)]
11264 if __tmp.remaining() < Self::ENCODED_LEN {
11265 panic!(
11266 "buffer is too small (need {} bytes, but got {})",
11267 Self::ENCODED_LEN,
11268 __tmp.remaining(),
11269 )
11270 }
11271 __tmp.put_u16_le(self.command as u16);
11272 __tmp.put_u8(self.result as u8);
11273 if matches!(version, MavlinkVersion::V2) {
11274 __tmp.put_u8(self.progress);
11275 __tmp.put_i32_le(self.result_param2);
11276 __tmp.put_u8(self.target_system);
11277 __tmp.put_u8(self.target_component);
11278 let len = __tmp.len();
11279 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11280 } else {
11281 __tmp.len()
11282 }
11283 }
11284}
11285#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11286#[doc = ""]
11287#[doc = "ID: 80"]
11288#[derive(Debug, Clone, PartialEq)]
11289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11291#[cfg_attr(feature = "ts", derive(TS))]
11292#[cfg_attr(feature = "ts", ts(export))]
11293pub struct COMMAND_CANCEL_DATA {
11294 #[doc = "Command ID (of command to cancel)."]
11295 pub command: MavCmd,
11296 #[doc = "System executing long running command. Should not be broadcast (0)."]
11297 pub target_system: u8,
11298 #[doc = "Component executing long running command."]
11299 pub target_component: u8,
11300}
11301impl COMMAND_CANCEL_DATA {
11302 pub const ENCODED_LEN: usize = 4usize;
11303 pub const DEFAULT: Self = Self {
11304 command: MavCmd::DEFAULT,
11305 target_system: 0_u8,
11306 target_component: 0_u8,
11307 };
11308 #[cfg(feature = "arbitrary")]
11309 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11310 use arbitrary::{Arbitrary, Unstructured};
11311 let mut buf = [0u8; 1024];
11312 rng.fill_bytes(&mut buf);
11313 let mut unstructured = Unstructured::new(&buf);
11314 Self::arbitrary(&mut unstructured).unwrap_or_default()
11315 }
11316}
11317impl Default for COMMAND_CANCEL_DATA {
11318 fn default() -> Self {
11319 Self::DEFAULT.clone()
11320 }
11321}
11322impl MessageData for COMMAND_CANCEL_DATA {
11323 type Message = MavMessage;
11324 const ID: u32 = 80u32;
11325 const NAME: &'static str = "COMMAND_CANCEL";
11326 const EXTRA_CRC: u8 = 14u8;
11327 const ENCODED_LEN: usize = 4usize;
11328 fn deser(
11329 _version: MavlinkVersion,
11330 __input: &[u8],
11331 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11332 let avail_len = __input.len();
11333 let mut payload_buf = [0; Self::ENCODED_LEN];
11334 let mut buf = if avail_len < Self::ENCODED_LEN {
11335 payload_buf[0..avail_len].copy_from_slice(__input);
11336 Bytes::new(&payload_buf)
11337 } else {
11338 Bytes::new(__input)
11339 };
11340 let mut __struct = Self::default();
11341 let tmp = buf.get_u16_le()?;
11342 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11343 ::mavlink_core::error::ParserError::InvalidEnum {
11344 enum_type: "MavCmd",
11345 value: tmp as u64,
11346 },
11347 )?;
11348 __struct.target_system = buf.get_u8()?;
11349 __struct.target_component = buf.get_u8()?;
11350 Ok(__struct)
11351 }
11352 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11353 let mut __tmp = BytesMut::new(bytes);
11354 #[allow(clippy::absurd_extreme_comparisons)]
11355 #[allow(unused_comparisons)]
11356 if __tmp.remaining() < Self::ENCODED_LEN {
11357 panic!(
11358 "buffer is too small (need {} bytes, but got {})",
11359 Self::ENCODED_LEN,
11360 __tmp.remaining(),
11361 )
11362 }
11363 __tmp.put_u16_le(self.command as u16);
11364 __tmp.put_u8(self.target_system);
11365 __tmp.put_u8(self.target_component);
11366 if matches!(version, MavlinkVersion::V2) {
11367 let len = __tmp.len();
11368 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11369 } else {
11370 __tmp.len()
11371 }
11372 }
11373}
11374#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11375#[doc = ""]
11376#[doc = "ID: 75"]
11377#[derive(Debug, Clone, PartialEq)]
11378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11380#[cfg_attr(feature = "ts", derive(TS))]
11381#[cfg_attr(feature = "ts", ts(export))]
11382pub struct COMMAND_INT_DATA {
11383 #[doc = "PARAM1, see MAV_CMD enum"]
11384 pub param1: f32,
11385 #[doc = "PARAM2, see MAV_CMD enum"]
11386 pub param2: f32,
11387 #[doc = "PARAM3, see MAV_CMD enum"]
11388 pub param3: f32,
11389 #[doc = "PARAM4, see MAV_CMD enum"]
11390 pub param4: f32,
11391 #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
11392 pub x: i32,
11393 #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
11394 pub y: i32,
11395 #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
11396 pub z: f32,
11397 #[doc = "The scheduled action for the mission item."]
11398 pub command: MavCmd,
11399 #[doc = "System ID"]
11400 pub target_system: u8,
11401 #[doc = "Component ID"]
11402 pub target_component: u8,
11403 #[doc = "The coordinate system of the COMMAND."]
11404 pub frame: MavFrame,
11405 #[doc = "Not used."]
11406 pub current: u8,
11407 #[doc = "Not used (set 0)."]
11408 pub autocontinue: u8,
11409}
11410impl COMMAND_INT_DATA {
11411 pub const ENCODED_LEN: usize = 35usize;
11412 pub const DEFAULT: Self = Self {
11413 param1: 0.0_f32,
11414 param2: 0.0_f32,
11415 param3: 0.0_f32,
11416 param4: 0.0_f32,
11417 x: 0_i32,
11418 y: 0_i32,
11419 z: 0.0_f32,
11420 command: MavCmd::DEFAULT,
11421 target_system: 0_u8,
11422 target_component: 0_u8,
11423 frame: MavFrame::DEFAULT,
11424 current: 0_u8,
11425 autocontinue: 0_u8,
11426 };
11427 #[cfg(feature = "arbitrary")]
11428 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11429 use arbitrary::{Arbitrary, Unstructured};
11430 let mut buf = [0u8; 1024];
11431 rng.fill_bytes(&mut buf);
11432 let mut unstructured = Unstructured::new(&buf);
11433 Self::arbitrary(&mut unstructured).unwrap_or_default()
11434 }
11435}
11436impl Default for COMMAND_INT_DATA {
11437 fn default() -> Self {
11438 Self::DEFAULT.clone()
11439 }
11440}
11441impl MessageData for COMMAND_INT_DATA {
11442 type Message = MavMessage;
11443 const ID: u32 = 75u32;
11444 const NAME: &'static str = "COMMAND_INT";
11445 const EXTRA_CRC: u8 = 158u8;
11446 const ENCODED_LEN: usize = 35usize;
11447 fn deser(
11448 _version: MavlinkVersion,
11449 __input: &[u8],
11450 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11451 let avail_len = __input.len();
11452 let mut payload_buf = [0; Self::ENCODED_LEN];
11453 let mut buf = if avail_len < Self::ENCODED_LEN {
11454 payload_buf[0..avail_len].copy_from_slice(__input);
11455 Bytes::new(&payload_buf)
11456 } else {
11457 Bytes::new(__input)
11458 };
11459 let mut __struct = Self::default();
11460 __struct.param1 = buf.get_f32_le()?;
11461 __struct.param2 = buf.get_f32_le()?;
11462 __struct.param3 = buf.get_f32_le()?;
11463 __struct.param4 = buf.get_f32_le()?;
11464 __struct.x = buf.get_i32_le()?;
11465 __struct.y = buf.get_i32_le()?;
11466 __struct.z = buf.get_f32_le()?;
11467 let tmp = buf.get_u16_le()?;
11468 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11469 ::mavlink_core::error::ParserError::InvalidEnum {
11470 enum_type: "MavCmd",
11471 value: tmp as u64,
11472 },
11473 )?;
11474 __struct.target_system = buf.get_u8()?;
11475 __struct.target_component = buf.get_u8()?;
11476 let tmp = buf.get_u8()?;
11477 __struct.frame =
11478 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11479 enum_type: "MavFrame",
11480 value: tmp as u64,
11481 })?;
11482 __struct.current = buf.get_u8()?;
11483 __struct.autocontinue = buf.get_u8()?;
11484 Ok(__struct)
11485 }
11486 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11487 let mut __tmp = BytesMut::new(bytes);
11488 #[allow(clippy::absurd_extreme_comparisons)]
11489 #[allow(unused_comparisons)]
11490 if __tmp.remaining() < Self::ENCODED_LEN {
11491 panic!(
11492 "buffer is too small (need {} bytes, but got {})",
11493 Self::ENCODED_LEN,
11494 __tmp.remaining(),
11495 )
11496 }
11497 __tmp.put_f32_le(self.param1);
11498 __tmp.put_f32_le(self.param2);
11499 __tmp.put_f32_le(self.param3);
11500 __tmp.put_f32_le(self.param4);
11501 __tmp.put_i32_le(self.x);
11502 __tmp.put_i32_le(self.y);
11503 __tmp.put_f32_le(self.z);
11504 __tmp.put_u16_le(self.command as u16);
11505 __tmp.put_u8(self.target_system);
11506 __tmp.put_u8(self.target_component);
11507 __tmp.put_u8(self.frame as u8);
11508 __tmp.put_u8(self.current);
11509 __tmp.put_u8(self.autocontinue);
11510 if matches!(version, MavlinkVersion::V2) {
11511 let len = __tmp.len();
11512 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11513 } else {
11514 __tmp.len()
11515 }
11516 }
11517}
11518#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11519#[doc = ""]
11520#[doc = "ID: 76"]
11521#[derive(Debug, Clone, PartialEq)]
11522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11524#[cfg_attr(feature = "ts", derive(TS))]
11525#[cfg_attr(feature = "ts", ts(export))]
11526pub struct COMMAND_LONG_DATA {
11527 #[doc = "Parameter 1 (for the specific command)."]
11528 pub param1: f32,
11529 #[doc = "Parameter 2 (for the specific command)."]
11530 pub param2: f32,
11531 #[doc = "Parameter 3 (for the specific command)."]
11532 pub param3: f32,
11533 #[doc = "Parameter 4 (for the specific command)."]
11534 pub param4: f32,
11535 #[doc = "Parameter 5 (for the specific command)."]
11536 pub param5: f32,
11537 #[doc = "Parameter 6 (for the specific command)."]
11538 pub param6: f32,
11539 #[doc = "Parameter 7 (for the specific command)."]
11540 pub param7: f32,
11541 #[doc = "Command ID (of command to send)."]
11542 pub command: MavCmd,
11543 #[doc = "System which should execute the command"]
11544 pub target_system: u8,
11545 #[doc = "Component which should execute the command, 0 for all components"]
11546 pub target_component: u8,
11547 #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
11548 pub confirmation: u8,
11549}
11550impl COMMAND_LONG_DATA {
11551 pub const ENCODED_LEN: usize = 33usize;
11552 pub const DEFAULT: Self = Self {
11553 param1: 0.0_f32,
11554 param2: 0.0_f32,
11555 param3: 0.0_f32,
11556 param4: 0.0_f32,
11557 param5: 0.0_f32,
11558 param6: 0.0_f32,
11559 param7: 0.0_f32,
11560 command: MavCmd::DEFAULT,
11561 target_system: 0_u8,
11562 target_component: 0_u8,
11563 confirmation: 0_u8,
11564 };
11565 #[cfg(feature = "arbitrary")]
11566 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11567 use arbitrary::{Arbitrary, Unstructured};
11568 let mut buf = [0u8; 1024];
11569 rng.fill_bytes(&mut buf);
11570 let mut unstructured = Unstructured::new(&buf);
11571 Self::arbitrary(&mut unstructured).unwrap_or_default()
11572 }
11573}
11574impl Default for COMMAND_LONG_DATA {
11575 fn default() -> Self {
11576 Self::DEFAULT.clone()
11577 }
11578}
11579impl MessageData for COMMAND_LONG_DATA {
11580 type Message = MavMessage;
11581 const ID: u32 = 76u32;
11582 const NAME: &'static str = "COMMAND_LONG";
11583 const EXTRA_CRC: u8 = 152u8;
11584 const ENCODED_LEN: usize = 33usize;
11585 fn deser(
11586 _version: MavlinkVersion,
11587 __input: &[u8],
11588 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11589 let avail_len = __input.len();
11590 let mut payload_buf = [0; Self::ENCODED_LEN];
11591 let mut buf = if avail_len < Self::ENCODED_LEN {
11592 payload_buf[0..avail_len].copy_from_slice(__input);
11593 Bytes::new(&payload_buf)
11594 } else {
11595 Bytes::new(__input)
11596 };
11597 let mut __struct = Self::default();
11598 __struct.param1 = buf.get_f32_le()?;
11599 __struct.param2 = buf.get_f32_le()?;
11600 __struct.param3 = buf.get_f32_le()?;
11601 __struct.param4 = buf.get_f32_le()?;
11602 __struct.param5 = buf.get_f32_le()?;
11603 __struct.param6 = buf.get_f32_le()?;
11604 __struct.param7 = buf.get_f32_le()?;
11605 let tmp = buf.get_u16_le()?;
11606 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11607 ::mavlink_core::error::ParserError::InvalidEnum {
11608 enum_type: "MavCmd",
11609 value: tmp as u64,
11610 },
11611 )?;
11612 __struct.target_system = buf.get_u8()?;
11613 __struct.target_component = buf.get_u8()?;
11614 __struct.confirmation = buf.get_u8()?;
11615 Ok(__struct)
11616 }
11617 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11618 let mut __tmp = BytesMut::new(bytes);
11619 #[allow(clippy::absurd_extreme_comparisons)]
11620 #[allow(unused_comparisons)]
11621 if __tmp.remaining() < Self::ENCODED_LEN {
11622 panic!(
11623 "buffer is too small (need {} bytes, but got {})",
11624 Self::ENCODED_LEN,
11625 __tmp.remaining(),
11626 )
11627 }
11628 __tmp.put_f32_le(self.param1);
11629 __tmp.put_f32_le(self.param2);
11630 __tmp.put_f32_le(self.param3);
11631 __tmp.put_f32_le(self.param4);
11632 __tmp.put_f32_le(self.param5);
11633 __tmp.put_f32_le(self.param6);
11634 __tmp.put_f32_le(self.param7);
11635 __tmp.put_u16_le(self.command as u16);
11636 __tmp.put_u8(self.target_system);
11637 __tmp.put_u8(self.target_component);
11638 __tmp.put_u8(self.confirmation);
11639 if matches!(version, MavlinkVersion::V2) {
11640 let len = __tmp.len();
11641 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11642 } else {
11643 __tmp.len()
11644 }
11645 }
11646}
11647#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
11648#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
11649#[doc = ""]
11650#[doc = "ID: 395"]
11651#[derive(Debug, Clone, PartialEq)]
11652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11654#[cfg_attr(feature = "ts", derive(TS))]
11655#[cfg_attr(feature = "ts", ts(export))]
11656pub struct COMPONENT_INFORMATION_DATA {
11657 #[doc = "Timestamp (time since system boot)."]
11658 pub time_boot_ms: u32,
11659 #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
11660 pub general_metadata_file_crc: u32,
11661 #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
11662 pub peripherals_metadata_file_crc: u32,
11663 #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
11664 #[cfg_attr(feature = "ts", ts(type = "string"))]
11665 pub general_metadata_uri: CharArray<100>,
11666 #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
11667 #[cfg_attr(feature = "ts", ts(type = "string"))]
11668 pub peripherals_metadata_uri: CharArray<100>,
11669}
11670impl COMPONENT_INFORMATION_DATA {
11671 pub const ENCODED_LEN: usize = 212usize;
11672 pub const DEFAULT: Self = Self {
11673 time_boot_ms: 0_u32,
11674 general_metadata_file_crc: 0_u32,
11675 peripherals_metadata_file_crc: 0_u32,
11676 general_metadata_uri: CharArray::new([0_u8; 100usize]),
11677 peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
11678 };
11679 #[cfg(feature = "arbitrary")]
11680 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11681 use arbitrary::{Arbitrary, Unstructured};
11682 let mut buf = [0u8; 1024];
11683 rng.fill_bytes(&mut buf);
11684 let mut unstructured = Unstructured::new(&buf);
11685 Self::arbitrary(&mut unstructured).unwrap_or_default()
11686 }
11687}
11688impl Default for COMPONENT_INFORMATION_DATA {
11689 fn default() -> Self {
11690 Self::DEFAULT.clone()
11691 }
11692}
11693impl MessageData for COMPONENT_INFORMATION_DATA {
11694 type Message = MavMessage;
11695 const ID: u32 = 395u32;
11696 const NAME: &'static str = "COMPONENT_INFORMATION";
11697 const EXTRA_CRC: u8 = 0u8;
11698 const ENCODED_LEN: usize = 212usize;
11699 fn deser(
11700 _version: MavlinkVersion,
11701 __input: &[u8],
11702 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11703 let avail_len = __input.len();
11704 let mut payload_buf = [0; Self::ENCODED_LEN];
11705 let mut buf = if avail_len < Self::ENCODED_LEN {
11706 payload_buf[0..avail_len].copy_from_slice(__input);
11707 Bytes::new(&payload_buf)
11708 } else {
11709 Bytes::new(__input)
11710 };
11711 let mut __struct = Self::default();
11712 __struct.time_boot_ms = buf.get_u32_le()?;
11713 __struct.general_metadata_file_crc = buf.get_u32_le()?;
11714 __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
11715 let mut tmp = [0_u8; 100usize];
11716 for v in &mut tmp {
11717 *v = buf.get_u8()?;
11718 }
11719 __struct.general_metadata_uri = CharArray::new(tmp);
11720 let mut tmp = [0_u8; 100usize];
11721 for v in &mut tmp {
11722 *v = buf.get_u8()?;
11723 }
11724 __struct.peripherals_metadata_uri = CharArray::new(tmp);
11725 Ok(__struct)
11726 }
11727 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11728 let mut __tmp = BytesMut::new(bytes);
11729 #[allow(clippy::absurd_extreme_comparisons)]
11730 #[allow(unused_comparisons)]
11731 if __tmp.remaining() < Self::ENCODED_LEN {
11732 panic!(
11733 "buffer is too small (need {} bytes, but got {})",
11734 Self::ENCODED_LEN,
11735 __tmp.remaining(),
11736 )
11737 }
11738 __tmp.put_u32_le(self.time_boot_ms);
11739 __tmp.put_u32_le(self.general_metadata_file_crc);
11740 __tmp.put_u32_le(self.peripherals_metadata_file_crc);
11741 for val in &self.general_metadata_uri {
11742 __tmp.put_u8(*val);
11743 }
11744 for val in &self.peripherals_metadata_uri {
11745 __tmp.put_u8(*val);
11746 }
11747 if matches!(version, MavlinkVersion::V2) {
11748 let len = __tmp.len();
11749 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11750 } else {
11751 __tmp.len()
11752 }
11753 }
11754}
11755#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
11756#[doc = ""]
11757#[doc = "ID: 396"]
11758#[derive(Debug, Clone, PartialEq)]
11759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11761#[cfg_attr(feature = "ts", derive(TS))]
11762#[cfg_attr(feature = "ts", ts(export))]
11763pub struct COMPONENT_INFORMATION_BASIC_DATA {
11764 #[doc = "Component capability flags"]
11765 pub capabilities: MavProtocolCapability,
11766 #[doc = "Timestamp (time since system boot)."]
11767 pub time_boot_ms: u32,
11768 #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
11769 pub time_manufacture_s: u32,
11770 #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
11771 #[cfg_attr(feature = "ts", ts(type = "string"))]
11772 pub vendor_name: CharArray<32>,
11773 #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
11774 #[cfg_attr(feature = "ts", ts(type = "string"))]
11775 pub model_name: CharArray<32>,
11776 #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
11777 #[cfg_attr(feature = "ts", ts(type = "string"))]
11778 pub software_version: CharArray<24>,
11779 #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch' (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
11780 #[cfg_attr(feature = "ts", ts(type = "string"))]
11781 pub hardware_version: CharArray<24>,
11782 #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
11783 #[cfg_attr(feature = "ts", ts(type = "string"))]
11784 pub serial_number: CharArray<32>,
11785}
11786impl COMPONENT_INFORMATION_BASIC_DATA {
11787 pub const ENCODED_LEN: usize = 160usize;
11788 pub const DEFAULT: Self = Self {
11789 capabilities: MavProtocolCapability::DEFAULT,
11790 time_boot_ms: 0_u32,
11791 time_manufacture_s: 0_u32,
11792 vendor_name: CharArray::new([0_u8; 32usize]),
11793 model_name: CharArray::new([0_u8; 32usize]),
11794 software_version: CharArray::new([0_u8; 24usize]),
11795 hardware_version: CharArray::new([0_u8; 24usize]),
11796 serial_number: CharArray::new([0_u8; 32usize]),
11797 };
11798 #[cfg(feature = "arbitrary")]
11799 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11800 use arbitrary::{Arbitrary, Unstructured};
11801 let mut buf = [0u8; 1024];
11802 rng.fill_bytes(&mut buf);
11803 let mut unstructured = Unstructured::new(&buf);
11804 Self::arbitrary(&mut unstructured).unwrap_or_default()
11805 }
11806}
11807impl Default for COMPONENT_INFORMATION_BASIC_DATA {
11808 fn default() -> Self {
11809 Self::DEFAULT.clone()
11810 }
11811}
11812impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
11813 type Message = MavMessage;
11814 const ID: u32 = 396u32;
11815 const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
11816 const EXTRA_CRC: u8 = 50u8;
11817 const ENCODED_LEN: usize = 160usize;
11818 fn deser(
11819 _version: MavlinkVersion,
11820 __input: &[u8],
11821 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11822 let avail_len = __input.len();
11823 let mut payload_buf = [0; Self::ENCODED_LEN];
11824 let mut buf = if avail_len < Self::ENCODED_LEN {
11825 payload_buf[0..avail_len].copy_from_slice(__input);
11826 Bytes::new(&payload_buf)
11827 } else {
11828 Bytes::new(__input)
11829 };
11830 let mut __struct = Self::default();
11831 let tmp = buf.get_u64_le()?;
11832 __struct.capabilities = MavProtocolCapability::from_bits(
11833 tmp as <MavProtocolCapability as Flags>::Bits,
11834 )
11835 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11836 flag_type: "MavProtocolCapability",
11837 value: tmp as u64,
11838 })?;
11839 __struct.time_boot_ms = buf.get_u32_le()?;
11840 __struct.time_manufacture_s = buf.get_u32_le()?;
11841 let mut tmp = [0_u8; 32usize];
11842 for v in &mut tmp {
11843 *v = buf.get_u8()?;
11844 }
11845 __struct.vendor_name = CharArray::new(tmp);
11846 let mut tmp = [0_u8; 32usize];
11847 for v in &mut tmp {
11848 *v = buf.get_u8()?;
11849 }
11850 __struct.model_name = CharArray::new(tmp);
11851 let mut tmp = [0_u8; 24usize];
11852 for v in &mut tmp {
11853 *v = buf.get_u8()?;
11854 }
11855 __struct.software_version = CharArray::new(tmp);
11856 let mut tmp = [0_u8; 24usize];
11857 for v in &mut tmp {
11858 *v = buf.get_u8()?;
11859 }
11860 __struct.hardware_version = CharArray::new(tmp);
11861 let mut tmp = [0_u8; 32usize];
11862 for v in &mut tmp {
11863 *v = buf.get_u8()?;
11864 }
11865 __struct.serial_number = CharArray::new(tmp);
11866 Ok(__struct)
11867 }
11868 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11869 let mut __tmp = BytesMut::new(bytes);
11870 #[allow(clippy::absurd_extreme_comparisons)]
11871 #[allow(unused_comparisons)]
11872 if __tmp.remaining() < Self::ENCODED_LEN {
11873 panic!(
11874 "buffer is too small (need {} bytes, but got {})",
11875 Self::ENCODED_LEN,
11876 __tmp.remaining(),
11877 )
11878 }
11879 __tmp.put_u64_le(self.capabilities.bits() as u64);
11880 __tmp.put_u32_le(self.time_boot_ms);
11881 __tmp.put_u32_le(self.time_manufacture_s);
11882 for val in &self.vendor_name {
11883 __tmp.put_u8(*val);
11884 }
11885 for val in &self.model_name {
11886 __tmp.put_u8(*val);
11887 }
11888 for val in &self.software_version {
11889 __tmp.put_u8(*val);
11890 }
11891 for val in &self.hardware_version {
11892 __tmp.put_u8(*val);
11893 }
11894 for val in &self.serial_number {
11895 __tmp.put_u8(*val);
11896 }
11897 if matches!(version, MavlinkVersion::V2) {
11898 let len = __tmp.len();
11899 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11900 } else {
11901 __tmp.len()
11902 }
11903 }
11904}
11905#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE. This contains the MAVLink FTP URI and CRC for the component's general metadata file. The file must be hosted on the component, and may be xz compressed. The file CRC can be used for file caching. The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet. For more information see: <https://mavlink.io/en/services/component_information.html>. Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
11906#[doc = ""]
11907#[doc = "ID: 397"]
11908#[derive(Debug, Clone, PartialEq)]
11909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11911#[cfg_attr(feature = "ts", derive(TS))]
11912#[cfg_attr(feature = "ts", ts(export))]
11913pub struct COMPONENT_METADATA_DATA {
11914 #[doc = "Timestamp (time since system boot)."]
11915 pub time_boot_ms: u32,
11916 #[doc = "CRC32 of the general metadata file."]
11917 pub file_crc: u32,
11918 #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
11919 #[cfg_attr(feature = "ts", ts(type = "string"))]
11920 pub uri: CharArray<100>,
11921}
11922impl COMPONENT_METADATA_DATA {
11923 pub const ENCODED_LEN: usize = 108usize;
11924 pub const DEFAULT: Self = Self {
11925 time_boot_ms: 0_u32,
11926 file_crc: 0_u32,
11927 uri: CharArray::new([0_u8; 100usize]),
11928 };
11929 #[cfg(feature = "arbitrary")]
11930 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11931 use arbitrary::{Arbitrary, Unstructured};
11932 let mut buf = [0u8; 1024];
11933 rng.fill_bytes(&mut buf);
11934 let mut unstructured = Unstructured::new(&buf);
11935 Self::arbitrary(&mut unstructured).unwrap_or_default()
11936 }
11937}
11938impl Default for COMPONENT_METADATA_DATA {
11939 fn default() -> Self {
11940 Self::DEFAULT.clone()
11941 }
11942}
11943impl MessageData for COMPONENT_METADATA_DATA {
11944 type Message = MavMessage;
11945 const ID: u32 = 397u32;
11946 const NAME: &'static str = "COMPONENT_METADATA";
11947 const EXTRA_CRC: u8 = 182u8;
11948 const ENCODED_LEN: usize = 108usize;
11949 fn deser(
11950 _version: MavlinkVersion,
11951 __input: &[u8],
11952 ) -> Result<Self, ::mavlink_core::error::ParserError> {
11953 let avail_len = __input.len();
11954 let mut payload_buf = [0; Self::ENCODED_LEN];
11955 let mut buf = if avail_len < Self::ENCODED_LEN {
11956 payload_buf[0..avail_len].copy_from_slice(__input);
11957 Bytes::new(&payload_buf)
11958 } else {
11959 Bytes::new(__input)
11960 };
11961 let mut __struct = Self::default();
11962 __struct.time_boot_ms = buf.get_u32_le()?;
11963 __struct.file_crc = buf.get_u32_le()?;
11964 let mut tmp = [0_u8; 100usize];
11965 for v in &mut tmp {
11966 *v = buf.get_u8()?;
11967 }
11968 __struct.uri = CharArray::new(tmp);
11969 Ok(__struct)
11970 }
11971 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11972 let mut __tmp = BytesMut::new(bytes);
11973 #[allow(clippy::absurd_extreme_comparisons)]
11974 #[allow(unused_comparisons)]
11975 if __tmp.remaining() < Self::ENCODED_LEN {
11976 panic!(
11977 "buffer is too small (need {} bytes, but got {})",
11978 Self::ENCODED_LEN,
11979 __tmp.remaining(),
11980 )
11981 }
11982 __tmp.put_u32_le(self.time_boot_ms);
11983 __tmp.put_u32_le(self.file_crc);
11984 for val in &self.uri {
11985 __tmp.put_u8(*val);
11986 }
11987 if matches!(version, MavlinkVersion::V2) {
11988 let len = __tmp.len();
11989 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11990 } else {
11991 __tmp.len()
11992 }
11993 }
11994}
11995#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
11996#[doc = ""]
11997#[doc = "ID: 146"]
11998#[derive(Debug, Clone, PartialEq)]
11999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12001#[cfg_attr(feature = "ts", derive(TS))]
12002#[cfg_attr(feature = "ts", ts(export))]
12003pub struct CONTROL_SYSTEM_STATE_DATA {
12004 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12005 pub time_usec: u64,
12006 #[doc = "X acceleration in body frame"]
12007 pub x_acc: f32,
12008 #[doc = "Y acceleration in body frame"]
12009 pub y_acc: f32,
12010 #[doc = "Z acceleration in body frame"]
12011 pub z_acc: f32,
12012 #[doc = "X velocity in body frame"]
12013 pub x_vel: f32,
12014 #[doc = "Y velocity in body frame"]
12015 pub y_vel: f32,
12016 #[doc = "Z velocity in body frame"]
12017 pub z_vel: f32,
12018 #[doc = "X position in local frame"]
12019 pub x_pos: f32,
12020 #[doc = "Y position in local frame"]
12021 pub y_pos: f32,
12022 #[doc = "Z position in local frame"]
12023 pub z_pos: f32,
12024 #[doc = "Airspeed, set to -1 if unknown"]
12025 pub airspeed: f32,
12026 #[doc = "Variance of body velocity estimate"]
12027 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12028 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12029 pub vel_variance: [f32; 3],
12030 #[doc = "Variance in local position"]
12031 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12032 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12033 pub pos_variance: [f32; 3],
12034 #[doc = "The attitude, represented as Quaternion"]
12035 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12036 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12037 pub q: [f32; 4],
12038 #[doc = "Angular rate in roll axis"]
12039 pub roll_rate: f32,
12040 #[doc = "Angular rate in pitch axis"]
12041 pub pitch_rate: f32,
12042 #[doc = "Angular rate in yaw axis"]
12043 pub yaw_rate: f32,
12044}
12045impl CONTROL_SYSTEM_STATE_DATA {
12046 pub const ENCODED_LEN: usize = 100usize;
12047 pub const DEFAULT: Self = Self {
12048 time_usec: 0_u64,
12049 x_acc: 0.0_f32,
12050 y_acc: 0.0_f32,
12051 z_acc: 0.0_f32,
12052 x_vel: 0.0_f32,
12053 y_vel: 0.0_f32,
12054 z_vel: 0.0_f32,
12055 x_pos: 0.0_f32,
12056 y_pos: 0.0_f32,
12057 z_pos: 0.0_f32,
12058 airspeed: 0.0_f32,
12059 vel_variance: [0.0_f32; 3usize],
12060 pos_variance: [0.0_f32; 3usize],
12061 q: [0.0_f32; 4usize],
12062 roll_rate: 0.0_f32,
12063 pitch_rate: 0.0_f32,
12064 yaw_rate: 0.0_f32,
12065 };
12066 #[cfg(feature = "arbitrary")]
12067 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12068 use arbitrary::{Arbitrary, Unstructured};
12069 let mut buf = [0u8; 1024];
12070 rng.fill_bytes(&mut buf);
12071 let mut unstructured = Unstructured::new(&buf);
12072 Self::arbitrary(&mut unstructured).unwrap_or_default()
12073 }
12074}
12075impl Default for CONTROL_SYSTEM_STATE_DATA {
12076 fn default() -> Self {
12077 Self::DEFAULT.clone()
12078 }
12079}
12080impl MessageData for CONTROL_SYSTEM_STATE_DATA {
12081 type Message = MavMessage;
12082 const ID: u32 = 146u32;
12083 const NAME: &'static str = "CONTROL_SYSTEM_STATE";
12084 const EXTRA_CRC: u8 = 103u8;
12085 const ENCODED_LEN: usize = 100usize;
12086 fn deser(
12087 _version: MavlinkVersion,
12088 __input: &[u8],
12089 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12090 let avail_len = __input.len();
12091 let mut payload_buf = [0; Self::ENCODED_LEN];
12092 let mut buf = if avail_len < Self::ENCODED_LEN {
12093 payload_buf[0..avail_len].copy_from_slice(__input);
12094 Bytes::new(&payload_buf)
12095 } else {
12096 Bytes::new(__input)
12097 };
12098 let mut __struct = Self::default();
12099 __struct.time_usec = buf.get_u64_le()?;
12100 __struct.x_acc = buf.get_f32_le()?;
12101 __struct.y_acc = buf.get_f32_le()?;
12102 __struct.z_acc = buf.get_f32_le()?;
12103 __struct.x_vel = buf.get_f32_le()?;
12104 __struct.y_vel = buf.get_f32_le()?;
12105 __struct.z_vel = buf.get_f32_le()?;
12106 __struct.x_pos = buf.get_f32_le()?;
12107 __struct.y_pos = buf.get_f32_le()?;
12108 __struct.z_pos = buf.get_f32_le()?;
12109 __struct.airspeed = buf.get_f32_le()?;
12110 for v in &mut __struct.vel_variance {
12111 let val = buf.get_f32_le()?;
12112 *v = val;
12113 }
12114 for v in &mut __struct.pos_variance {
12115 let val = buf.get_f32_le()?;
12116 *v = val;
12117 }
12118 for v in &mut __struct.q {
12119 let val = buf.get_f32_le()?;
12120 *v = val;
12121 }
12122 __struct.roll_rate = buf.get_f32_le()?;
12123 __struct.pitch_rate = buf.get_f32_le()?;
12124 __struct.yaw_rate = buf.get_f32_le()?;
12125 Ok(__struct)
12126 }
12127 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12128 let mut __tmp = BytesMut::new(bytes);
12129 #[allow(clippy::absurd_extreme_comparisons)]
12130 #[allow(unused_comparisons)]
12131 if __tmp.remaining() < Self::ENCODED_LEN {
12132 panic!(
12133 "buffer is too small (need {} bytes, but got {})",
12134 Self::ENCODED_LEN,
12135 __tmp.remaining(),
12136 )
12137 }
12138 __tmp.put_u64_le(self.time_usec);
12139 __tmp.put_f32_le(self.x_acc);
12140 __tmp.put_f32_le(self.y_acc);
12141 __tmp.put_f32_le(self.z_acc);
12142 __tmp.put_f32_le(self.x_vel);
12143 __tmp.put_f32_le(self.y_vel);
12144 __tmp.put_f32_le(self.z_vel);
12145 __tmp.put_f32_le(self.x_pos);
12146 __tmp.put_f32_le(self.y_pos);
12147 __tmp.put_f32_le(self.z_pos);
12148 __tmp.put_f32_le(self.airspeed);
12149 for val in &self.vel_variance {
12150 __tmp.put_f32_le(*val);
12151 }
12152 for val in &self.pos_variance {
12153 __tmp.put_f32_le(*val);
12154 }
12155 for val in &self.q {
12156 __tmp.put_f32_le(*val);
12157 }
12158 __tmp.put_f32_le(self.roll_rate);
12159 __tmp.put_f32_le(self.pitch_rate);
12160 __tmp.put_f32_le(self.yaw_rate);
12161 if matches!(version, MavlinkVersion::V2) {
12162 let len = __tmp.len();
12163 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12164 } else {
12165 __tmp.len()
12166 }
12167 }
12168}
12169#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
12170#[doc = ""]
12171#[doc = "ID: 411"]
12172#[derive(Debug, Clone, PartialEq)]
12173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12175#[cfg_attr(feature = "ts", derive(TS))]
12176#[cfg_attr(feature = "ts", ts(export))]
12177pub struct CURRENT_EVENT_SEQUENCE_DATA {
12178 #[doc = "Sequence number."]
12179 pub sequence: u16,
12180 #[doc = "Flag bitset."]
12181 pub flags: MavEventCurrentSequenceFlags,
12182}
12183impl CURRENT_EVENT_SEQUENCE_DATA {
12184 pub const ENCODED_LEN: usize = 3usize;
12185 pub const DEFAULT: Self = Self {
12186 sequence: 0_u16,
12187 flags: MavEventCurrentSequenceFlags::DEFAULT,
12188 };
12189 #[cfg(feature = "arbitrary")]
12190 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12191 use arbitrary::{Arbitrary, Unstructured};
12192 let mut buf = [0u8; 1024];
12193 rng.fill_bytes(&mut buf);
12194 let mut unstructured = Unstructured::new(&buf);
12195 Self::arbitrary(&mut unstructured).unwrap_or_default()
12196 }
12197}
12198impl Default for CURRENT_EVENT_SEQUENCE_DATA {
12199 fn default() -> Self {
12200 Self::DEFAULT.clone()
12201 }
12202}
12203impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
12204 type Message = MavMessage;
12205 const ID: u32 = 411u32;
12206 const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
12207 const EXTRA_CRC: u8 = 106u8;
12208 const ENCODED_LEN: usize = 3usize;
12209 fn deser(
12210 _version: MavlinkVersion,
12211 __input: &[u8],
12212 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12213 let avail_len = __input.len();
12214 let mut payload_buf = [0; Self::ENCODED_LEN];
12215 let mut buf = if avail_len < Self::ENCODED_LEN {
12216 payload_buf[0..avail_len].copy_from_slice(__input);
12217 Bytes::new(&payload_buf)
12218 } else {
12219 Bytes::new(__input)
12220 };
12221 let mut __struct = Self::default();
12222 __struct.sequence = buf.get_u16_le()?;
12223 let tmp = buf.get_u8()?;
12224 __struct.flags = MavEventCurrentSequenceFlags::from_bits(
12225 tmp as <MavEventCurrentSequenceFlags as Flags>::Bits,
12226 )
12227 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12228 flag_type: "MavEventCurrentSequenceFlags",
12229 value: tmp as u64,
12230 })?;
12231 Ok(__struct)
12232 }
12233 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12234 let mut __tmp = BytesMut::new(bytes);
12235 #[allow(clippy::absurd_extreme_comparisons)]
12236 #[allow(unused_comparisons)]
12237 if __tmp.remaining() < Self::ENCODED_LEN {
12238 panic!(
12239 "buffer is too small (need {} bytes, but got {})",
12240 Self::ENCODED_LEN,
12241 __tmp.remaining(),
12242 )
12243 }
12244 __tmp.put_u16_le(self.sequence);
12245 __tmp.put_u8(self.flags.bits() as u8);
12246 if matches!(version, MavlinkVersion::V2) {
12247 let len = __tmp.len();
12248 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12249 } else {
12250 __tmp.len()
12251 }
12252 }
12253}
12254#[doc = "Get the current mode. This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz). It may be requested using MAV_CMD_REQUEST_MESSAGE. See <https://mavlink.io/en/services/standard_modes.html>."]
12255#[doc = ""]
12256#[doc = "ID: 436"]
12257#[derive(Debug, Clone, PartialEq)]
12258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12260#[cfg_attr(feature = "ts", derive(TS))]
12261#[cfg_attr(feature = "ts", ts(export))]
12262pub struct CURRENT_MODE_DATA {
12263 #[doc = "A bitfield for use for autopilot-specific flags"]
12264 pub custom_mode: u32,
12265 #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
12266 pub intended_custom_mode: u32,
12267 #[doc = "Standard mode."]
12268 pub standard_mode: MavStandardMode,
12269}
12270impl CURRENT_MODE_DATA {
12271 pub const ENCODED_LEN: usize = 9usize;
12272 pub const DEFAULT: Self = Self {
12273 custom_mode: 0_u32,
12274 intended_custom_mode: 0_u32,
12275 standard_mode: MavStandardMode::DEFAULT,
12276 };
12277 #[cfg(feature = "arbitrary")]
12278 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12279 use arbitrary::{Arbitrary, Unstructured};
12280 let mut buf = [0u8; 1024];
12281 rng.fill_bytes(&mut buf);
12282 let mut unstructured = Unstructured::new(&buf);
12283 Self::arbitrary(&mut unstructured).unwrap_or_default()
12284 }
12285}
12286impl Default for CURRENT_MODE_DATA {
12287 fn default() -> Self {
12288 Self::DEFAULT.clone()
12289 }
12290}
12291impl MessageData for CURRENT_MODE_DATA {
12292 type Message = MavMessage;
12293 const ID: u32 = 436u32;
12294 const NAME: &'static str = "CURRENT_MODE";
12295 const EXTRA_CRC: u8 = 193u8;
12296 const ENCODED_LEN: usize = 9usize;
12297 fn deser(
12298 _version: MavlinkVersion,
12299 __input: &[u8],
12300 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12301 let avail_len = __input.len();
12302 let mut payload_buf = [0; Self::ENCODED_LEN];
12303 let mut buf = if avail_len < Self::ENCODED_LEN {
12304 payload_buf[0..avail_len].copy_from_slice(__input);
12305 Bytes::new(&payload_buf)
12306 } else {
12307 Bytes::new(__input)
12308 };
12309 let mut __struct = Self::default();
12310 __struct.custom_mode = buf.get_u32_le()?;
12311 __struct.intended_custom_mode = buf.get_u32_le()?;
12312 let tmp = buf.get_u8()?;
12313 __struct.standard_mode =
12314 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12315 enum_type: "MavStandardMode",
12316 value: tmp as u64,
12317 })?;
12318 Ok(__struct)
12319 }
12320 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12321 let mut __tmp = BytesMut::new(bytes);
12322 #[allow(clippy::absurd_extreme_comparisons)]
12323 #[allow(unused_comparisons)]
12324 if __tmp.remaining() < Self::ENCODED_LEN {
12325 panic!(
12326 "buffer is too small (need {} bytes, but got {})",
12327 Self::ENCODED_LEN,
12328 __tmp.remaining(),
12329 )
12330 }
12331 __tmp.put_u32_le(self.custom_mode);
12332 __tmp.put_u32_le(self.intended_custom_mode);
12333 __tmp.put_u8(self.standard_mode as u8);
12334 if matches!(version, MavlinkVersion::V2) {
12335 let len = __tmp.len();
12336 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12337 } else {
12338 __tmp.len()
12339 }
12340 }
12341}
12342#[deprecated = " See `MESSAGE_INTERVAL` (Superseded since 2015-08)"]
12343#[doc = "Data stream status information."]
12344#[doc = ""]
12345#[doc = "ID: 67"]
12346#[derive(Debug, Clone, PartialEq)]
12347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12348#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12349#[cfg_attr(feature = "ts", derive(TS))]
12350#[cfg_attr(feature = "ts", ts(export))]
12351pub struct DATA_STREAM_DATA {
12352 #[doc = "The message rate"]
12353 pub message_rate: u16,
12354 #[doc = "The ID of the requested data stream"]
12355 pub stream_id: u8,
12356 #[doc = "1 stream is enabled, 0 stream is stopped."]
12357 pub on_off: u8,
12358}
12359impl DATA_STREAM_DATA {
12360 pub const ENCODED_LEN: usize = 4usize;
12361 pub const DEFAULT: Self = Self {
12362 message_rate: 0_u16,
12363 stream_id: 0_u8,
12364 on_off: 0_u8,
12365 };
12366 #[cfg(feature = "arbitrary")]
12367 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12368 use arbitrary::{Arbitrary, Unstructured};
12369 let mut buf = [0u8; 1024];
12370 rng.fill_bytes(&mut buf);
12371 let mut unstructured = Unstructured::new(&buf);
12372 Self::arbitrary(&mut unstructured).unwrap_or_default()
12373 }
12374}
12375impl Default for DATA_STREAM_DATA {
12376 fn default() -> Self {
12377 Self::DEFAULT.clone()
12378 }
12379}
12380impl MessageData for DATA_STREAM_DATA {
12381 type Message = MavMessage;
12382 const ID: u32 = 67u32;
12383 const NAME: &'static str = "DATA_STREAM";
12384 const EXTRA_CRC: u8 = 21u8;
12385 const ENCODED_LEN: usize = 4usize;
12386 fn deser(
12387 _version: MavlinkVersion,
12388 __input: &[u8],
12389 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12390 let avail_len = __input.len();
12391 let mut payload_buf = [0; Self::ENCODED_LEN];
12392 let mut buf = if avail_len < Self::ENCODED_LEN {
12393 payload_buf[0..avail_len].copy_from_slice(__input);
12394 Bytes::new(&payload_buf)
12395 } else {
12396 Bytes::new(__input)
12397 };
12398 let mut __struct = Self::default();
12399 __struct.message_rate = buf.get_u16_le()?;
12400 __struct.stream_id = buf.get_u8()?;
12401 __struct.on_off = buf.get_u8()?;
12402 Ok(__struct)
12403 }
12404 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12405 let mut __tmp = BytesMut::new(bytes);
12406 #[allow(clippy::absurd_extreme_comparisons)]
12407 #[allow(unused_comparisons)]
12408 if __tmp.remaining() < Self::ENCODED_LEN {
12409 panic!(
12410 "buffer is too small (need {} bytes, but got {})",
12411 Self::ENCODED_LEN,
12412 __tmp.remaining(),
12413 )
12414 }
12415 __tmp.put_u16_le(self.message_rate);
12416 __tmp.put_u8(self.stream_id);
12417 __tmp.put_u8(self.on_off);
12418 if matches!(version, MavlinkVersion::V2) {
12419 let len = __tmp.len();
12420 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12421 } else {
12422 __tmp.len()
12423 }
12424 }
12425}
12426#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
12427#[doc = ""]
12428#[doc = "ID: 130"]
12429#[derive(Debug, Clone, PartialEq)]
12430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12431#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12432#[cfg_attr(feature = "ts", derive(TS))]
12433#[cfg_attr(feature = "ts", ts(export))]
12434pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
12435 #[doc = "total data size (set on ACK only)."]
12436 pub size: u32,
12437 #[doc = "Width of a matrix or image."]
12438 pub width: u16,
12439 #[doc = "Height of a matrix or image."]
12440 pub height: u16,
12441 #[doc = "Number of packets being sent (set on ACK only)."]
12442 pub packets: u16,
12443 #[doc = "Type of requested/acknowledged data."]
12444 pub mavtype: MavlinkDataStreamType,
12445 #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
12446 pub payload: u8,
12447 #[doc = "JPEG quality. Values: [1-100]."]
12448 pub jpg_quality: u8,
12449}
12450impl DATA_TRANSMISSION_HANDSHAKE_DATA {
12451 pub const ENCODED_LEN: usize = 13usize;
12452 pub const DEFAULT: Self = Self {
12453 size: 0_u32,
12454 width: 0_u16,
12455 height: 0_u16,
12456 packets: 0_u16,
12457 mavtype: MavlinkDataStreamType::DEFAULT,
12458 payload: 0_u8,
12459 jpg_quality: 0_u8,
12460 };
12461 #[cfg(feature = "arbitrary")]
12462 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12463 use arbitrary::{Arbitrary, Unstructured};
12464 let mut buf = [0u8; 1024];
12465 rng.fill_bytes(&mut buf);
12466 let mut unstructured = Unstructured::new(&buf);
12467 Self::arbitrary(&mut unstructured).unwrap_or_default()
12468 }
12469}
12470impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
12471 fn default() -> Self {
12472 Self::DEFAULT.clone()
12473 }
12474}
12475impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
12476 type Message = MavMessage;
12477 const ID: u32 = 130u32;
12478 const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
12479 const EXTRA_CRC: u8 = 29u8;
12480 const ENCODED_LEN: usize = 13usize;
12481 fn deser(
12482 _version: MavlinkVersion,
12483 __input: &[u8],
12484 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12485 let avail_len = __input.len();
12486 let mut payload_buf = [0; Self::ENCODED_LEN];
12487 let mut buf = if avail_len < Self::ENCODED_LEN {
12488 payload_buf[0..avail_len].copy_from_slice(__input);
12489 Bytes::new(&payload_buf)
12490 } else {
12491 Bytes::new(__input)
12492 };
12493 let mut __struct = Self::default();
12494 __struct.size = buf.get_u32_le()?;
12495 __struct.width = buf.get_u16_le()?;
12496 __struct.height = buf.get_u16_le()?;
12497 __struct.packets = buf.get_u16_le()?;
12498 let tmp = buf.get_u8()?;
12499 __struct.mavtype =
12500 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12501 enum_type: "MavlinkDataStreamType",
12502 value: tmp as u64,
12503 })?;
12504 __struct.payload = buf.get_u8()?;
12505 __struct.jpg_quality = buf.get_u8()?;
12506 Ok(__struct)
12507 }
12508 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12509 let mut __tmp = BytesMut::new(bytes);
12510 #[allow(clippy::absurd_extreme_comparisons)]
12511 #[allow(unused_comparisons)]
12512 if __tmp.remaining() < Self::ENCODED_LEN {
12513 panic!(
12514 "buffer is too small (need {} bytes, but got {})",
12515 Self::ENCODED_LEN,
12516 __tmp.remaining(),
12517 )
12518 }
12519 __tmp.put_u32_le(self.size);
12520 __tmp.put_u16_le(self.width);
12521 __tmp.put_u16_le(self.height);
12522 __tmp.put_u16_le(self.packets);
12523 __tmp.put_u8(self.mavtype as u8);
12524 __tmp.put_u8(self.payload);
12525 __tmp.put_u8(self.jpg_quality);
12526 if matches!(version, MavlinkVersion::V2) {
12527 let len = __tmp.len();
12528 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12529 } else {
12530 __tmp.len()
12531 }
12532 }
12533}
12534#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
12535#[doc = ""]
12536#[doc = "ID: 254"]
12537#[derive(Debug, Clone, PartialEq)]
12538#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12540#[cfg_attr(feature = "ts", derive(TS))]
12541#[cfg_attr(feature = "ts", ts(export))]
12542pub struct DEBUG_DATA {
12543 #[doc = "Timestamp (time since system boot)."]
12544 pub time_boot_ms: u32,
12545 #[doc = "DEBUG value"]
12546 pub value: f32,
12547 #[doc = "index of debug variable"]
12548 pub ind: u8,
12549}
12550impl DEBUG_DATA {
12551 pub const ENCODED_LEN: usize = 9usize;
12552 pub const DEFAULT: Self = Self {
12553 time_boot_ms: 0_u32,
12554 value: 0.0_f32,
12555 ind: 0_u8,
12556 };
12557 #[cfg(feature = "arbitrary")]
12558 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12559 use arbitrary::{Arbitrary, Unstructured};
12560 let mut buf = [0u8; 1024];
12561 rng.fill_bytes(&mut buf);
12562 let mut unstructured = Unstructured::new(&buf);
12563 Self::arbitrary(&mut unstructured).unwrap_or_default()
12564 }
12565}
12566impl Default for DEBUG_DATA {
12567 fn default() -> Self {
12568 Self::DEFAULT.clone()
12569 }
12570}
12571impl MessageData for DEBUG_DATA {
12572 type Message = MavMessage;
12573 const ID: u32 = 254u32;
12574 const NAME: &'static str = "DEBUG";
12575 const EXTRA_CRC: u8 = 46u8;
12576 const ENCODED_LEN: usize = 9usize;
12577 fn deser(
12578 _version: MavlinkVersion,
12579 __input: &[u8],
12580 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12581 let avail_len = __input.len();
12582 let mut payload_buf = [0; Self::ENCODED_LEN];
12583 let mut buf = if avail_len < Self::ENCODED_LEN {
12584 payload_buf[0..avail_len].copy_from_slice(__input);
12585 Bytes::new(&payload_buf)
12586 } else {
12587 Bytes::new(__input)
12588 };
12589 let mut __struct = Self::default();
12590 __struct.time_boot_ms = buf.get_u32_le()?;
12591 __struct.value = buf.get_f32_le()?;
12592 __struct.ind = buf.get_u8()?;
12593 Ok(__struct)
12594 }
12595 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12596 let mut __tmp = BytesMut::new(bytes);
12597 #[allow(clippy::absurd_extreme_comparisons)]
12598 #[allow(unused_comparisons)]
12599 if __tmp.remaining() < Self::ENCODED_LEN {
12600 panic!(
12601 "buffer is too small (need {} bytes, but got {})",
12602 Self::ENCODED_LEN,
12603 __tmp.remaining(),
12604 )
12605 }
12606 __tmp.put_u32_le(self.time_boot_ms);
12607 __tmp.put_f32_le(self.value);
12608 __tmp.put_u8(self.ind);
12609 if matches!(version, MavlinkVersion::V2) {
12610 let len = __tmp.len();
12611 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12612 } else {
12613 __tmp.len()
12614 }
12615 }
12616}
12617#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
12618#[doc = ""]
12619#[doc = "ID: 350"]
12620#[derive(Debug, Clone, PartialEq)]
12621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12623#[cfg_attr(feature = "ts", derive(TS))]
12624#[cfg_attr(feature = "ts", ts(export))]
12625pub struct DEBUG_FLOAT_ARRAY_DATA {
12626 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12627 pub time_usec: u64,
12628 #[doc = "Unique ID used to discriminate between arrays"]
12629 pub array_id: u16,
12630 #[doc = "Name, for human-friendly display in a Ground Control Station"]
12631 #[cfg_attr(feature = "ts", ts(type = "string"))]
12632 pub name: CharArray<10>,
12633 #[doc = "data"]
12634 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12635 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12636 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12637 pub data: [f32; 58],
12638}
12639impl DEBUG_FLOAT_ARRAY_DATA {
12640 pub const ENCODED_LEN: usize = 252usize;
12641 pub const DEFAULT: Self = Self {
12642 time_usec: 0_u64,
12643 array_id: 0_u16,
12644 name: CharArray::new([0_u8; 10usize]),
12645 data: [0.0_f32; 58usize],
12646 };
12647 #[cfg(feature = "arbitrary")]
12648 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12649 use arbitrary::{Arbitrary, Unstructured};
12650 let mut buf = [0u8; 1024];
12651 rng.fill_bytes(&mut buf);
12652 let mut unstructured = Unstructured::new(&buf);
12653 Self::arbitrary(&mut unstructured).unwrap_or_default()
12654 }
12655}
12656impl Default for DEBUG_FLOAT_ARRAY_DATA {
12657 fn default() -> Self {
12658 Self::DEFAULT.clone()
12659 }
12660}
12661impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
12662 type Message = MavMessage;
12663 const ID: u32 = 350u32;
12664 const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
12665 const EXTRA_CRC: u8 = 232u8;
12666 const ENCODED_LEN: usize = 252usize;
12667 fn deser(
12668 _version: MavlinkVersion,
12669 __input: &[u8],
12670 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12671 let avail_len = __input.len();
12672 let mut payload_buf = [0; Self::ENCODED_LEN];
12673 let mut buf = if avail_len < Self::ENCODED_LEN {
12674 payload_buf[0..avail_len].copy_from_slice(__input);
12675 Bytes::new(&payload_buf)
12676 } else {
12677 Bytes::new(__input)
12678 };
12679 let mut __struct = Self::default();
12680 __struct.time_usec = buf.get_u64_le()?;
12681 __struct.array_id = buf.get_u16_le()?;
12682 let mut tmp = [0_u8; 10usize];
12683 for v in &mut tmp {
12684 *v = buf.get_u8()?;
12685 }
12686 __struct.name = CharArray::new(tmp);
12687 for v in &mut __struct.data {
12688 let val = buf.get_f32_le()?;
12689 *v = val;
12690 }
12691 Ok(__struct)
12692 }
12693 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12694 let mut __tmp = BytesMut::new(bytes);
12695 #[allow(clippy::absurd_extreme_comparisons)]
12696 #[allow(unused_comparisons)]
12697 if __tmp.remaining() < Self::ENCODED_LEN {
12698 panic!(
12699 "buffer is too small (need {} bytes, but got {})",
12700 Self::ENCODED_LEN,
12701 __tmp.remaining(),
12702 )
12703 }
12704 __tmp.put_u64_le(self.time_usec);
12705 __tmp.put_u16_le(self.array_id);
12706 for val in &self.name {
12707 __tmp.put_u8(*val);
12708 }
12709 if matches!(version, MavlinkVersion::V2) {
12710 for val in &self.data {
12711 __tmp.put_f32_le(*val);
12712 }
12713 let len = __tmp.len();
12714 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12715 } else {
12716 __tmp.len()
12717 }
12718 }
12719}
12720#[doc = "To debug something using a named 3D vector."]
12721#[doc = ""]
12722#[doc = "ID: 250"]
12723#[derive(Debug, Clone, PartialEq)]
12724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12726#[cfg_attr(feature = "ts", derive(TS))]
12727#[cfg_attr(feature = "ts", ts(export))]
12728pub struct DEBUG_VECT_DATA {
12729 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12730 pub time_usec: u64,
12731 #[doc = "x"]
12732 pub x: f32,
12733 #[doc = "y"]
12734 pub y: f32,
12735 #[doc = "z"]
12736 pub z: f32,
12737 #[doc = "Name"]
12738 #[cfg_attr(feature = "ts", ts(type = "string"))]
12739 pub name: CharArray<10>,
12740}
12741impl DEBUG_VECT_DATA {
12742 pub const ENCODED_LEN: usize = 30usize;
12743 pub const DEFAULT: Self = Self {
12744 time_usec: 0_u64,
12745 x: 0.0_f32,
12746 y: 0.0_f32,
12747 z: 0.0_f32,
12748 name: CharArray::new([0_u8; 10usize]),
12749 };
12750 #[cfg(feature = "arbitrary")]
12751 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12752 use arbitrary::{Arbitrary, Unstructured};
12753 let mut buf = [0u8; 1024];
12754 rng.fill_bytes(&mut buf);
12755 let mut unstructured = Unstructured::new(&buf);
12756 Self::arbitrary(&mut unstructured).unwrap_or_default()
12757 }
12758}
12759impl Default for DEBUG_VECT_DATA {
12760 fn default() -> Self {
12761 Self::DEFAULT.clone()
12762 }
12763}
12764impl MessageData for DEBUG_VECT_DATA {
12765 type Message = MavMessage;
12766 const ID: u32 = 250u32;
12767 const NAME: &'static str = "DEBUG_VECT";
12768 const EXTRA_CRC: u8 = 49u8;
12769 const ENCODED_LEN: usize = 30usize;
12770 fn deser(
12771 _version: MavlinkVersion,
12772 __input: &[u8],
12773 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12774 let avail_len = __input.len();
12775 let mut payload_buf = [0; Self::ENCODED_LEN];
12776 let mut buf = if avail_len < Self::ENCODED_LEN {
12777 payload_buf[0..avail_len].copy_from_slice(__input);
12778 Bytes::new(&payload_buf)
12779 } else {
12780 Bytes::new(__input)
12781 };
12782 let mut __struct = Self::default();
12783 __struct.time_usec = buf.get_u64_le()?;
12784 __struct.x = buf.get_f32_le()?;
12785 __struct.y = buf.get_f32_le()?;
12786 __struct.z = buf.get_f32_le()?;
12787 let mut tmp = [0_u8; 10usize];
12788 for v in &mut tmp {
12789 *v = buf.get_u8()?;
12790 }
12791 __struct.name = CharArray::new(tmp);
12792 Ok(__struct)
12793 }
12794 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12795 let mut __tmp = BytesMut::new(bytes);
12796 #[allow(clippy::absurd_extreme_comparisons)]
12797 #[allow(unused_comparisons)]
12798 if __tmp.remaining() < Self::ENCODED_LEN {
12799 panic!(
12800 "buffer is too small (need {} bytes, but got {})",
12801 Self::ENCODED_LEN,
12802 __tmp.remaining(),
12803 )
12804 }
12805 __tmp.put_u64_le(self.time_usec);
12806 __tmp.put_f32_le(self.x);
12807 __tmp.put_f32_le(self.y);
12808 __tmp.put_f32_le(self.z);
12809 for val in &self.name {
12810 __tmp.put_u8(*val);
12811 }
12812 if matches!(version, MavlinkVersion::V2) {
12813 let len = __tmp.len();
12814 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12815 } else {
12816 __tmp.len()
12817 }
12818 }
12819}
12820#[doc = "Distance sensor information for an onboard rangefinder."]
12821#[doc = ""]
12822#[doc = "ID: 132"]
12823#[derive(Debug, Clone, PartialEq)]
12824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12826#[cfg_attr(feature = "ts", derive(TS))]
12827#[cfg_attr(feature = "ts", ts(export))]
12828pub struct DISTANCE_SENSOR_DATA {
12829 #[doc = "Timestamp (time since system boot)."]
12830 pub time_boot_ms: u32,
12831 #[doc = "Minimum distance the sensor can measure"]
12832 pub min_distance: u16,
12833 #[doc = "Maximum distance the sensor can measure"]
12834 pub max_distance: u16,
12835 #[doc = "Current distance reading"]
12836 pub current_distance: u16,
12837 #[doc = "Type of distance sensor."]
12838 pub mavtype: MavDistanceSensor,
12839 #[doc = "Onboard ID of the sensor"]
12840 pub id: u8,
12841 #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
12842 pub orientation: MavSensorOrientation,
12843 #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
12844 pub covariance: u8,
12845 #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
12846 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12847 pub horizontal_fov: f32,
12848 #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
12849 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12850 pub vertical_fov: f32,
12851 #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
12852 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12853 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12854 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12855 pub quaternion: [f32; 4],
12856 #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
12857 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12858 pub signal_quality: u8,
12859}
12860impl DISTANCE_SENSOR_DATA {
12861 pub const ENCODED_LEN: usize = 39usize;
12862 pub const DEFAULT: Self = Self {
12863 time_boot_ms: 0_u32,
12864 min_distance: 0_u16,
12865 max_distance: 0_u16,
12866 current_distance: 0_u16,
12867 mavtype: MavDistanceSensor::DEFAULT,
12868 id: 0_u8,
12869 orientation: MavSensorOrientation::DEFAULT,
12870 covariance: 0_u8,
12871 horizontal_fov: 0.0_f32,
12872 vertical_fov: 0.0_f32,
12873 quaternion: [0.0_f32; 4usize],
12874 signal_quality: 0_u8,
12875 };
12876 #[cfg(feature = "arbitrary")]
12877 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12878 use arbitrary::{Arbitrary, Unstructured};
12879 let mut buf = [0u8; 1024];
12880 rng.fill_bytes(&mut buf);
12881 let mut unstructured = Unstructured::new(&buf);
12882 Self::arbitrary(&mut unstructured).unwrap_or_default()
12883 }
12884}
12885impl Default for DISTANCE_SENSOR_DATA {
12886 fn default() -> Self {
12887 Self::DEFAULT.clone()
12888 }
12889}
12890impl MessageData for DISTANCE_SENSOR_DATA {
12891 type Message = MavMessage;
12892 const ID: u32 = 132u32;
12893 const NAME: &'static str = "DISTANCE_SENSOR";
12894 const EXTRA_CRC: u8 = 85u8;
12895 const ENCODED_LEN: usize = 39usize;
12896 fn deser(
12897 _version: MavlinkVersion,
12898 __input: &[u8],
12899 ) -> Result<Self, ::mavlink_core::error::ParserError> {
12900 let avail_len = __input.len();
12901 let mut payload_buf = [0; Self::ENCODED_LEN];
12902 let mut buf = if avail_len < Self::ENCODED_LEN {
12903 payload_buf[0..avail_len].copy_from_slice(__input);
12904 Bytes::new(&payload_buf)
12905 } else {
12906 Bytes::new(__input)
12907 };
12908 let mut __struct = Self::default();
12909 __struct.time_boot_ms = buf.get_u32_le()?;
12910 __struct.min_distance = buf.get_u16_le()?;
12911 __struct.max_distance = buf.get_u16_le()?;
12912 __struct.current_distance = buf.get_u16_le()?;
12913 let tmp = buf.get_u8()?;
12914 __struct.mavtype =
12915 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12916 enum_type: "MavDistanceSensor",
12917 value: tmp as u64,
12918 })?;
12919 __struct.id = buf.get_u8()?;
12920 let tmp = buf.get_u8()?;
12921 __struct.orientation =
12922 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12923 enum_type: "MavSensorOrientation",
12924 value: tmp as u64,
12925 })?;
12926 __struct.covariance = buf.get_u8()?;
12927 __struct.horizontal_fov = buf.get_f32_le()?;
12928 __struct.vertical_fov = buf.get_f32_le()?;
12929 for v in &mut __struct.quaternion {
12930 let val = buf.get_f32_le()?;
12931 *v = val;
12932 }
12933 __struct.signal_quality = buf.get_u8()?;
12934 Ok(__struct)
12935 }
12936 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12937 let mut __tmp = BytesMut::new(bytes);
12938 #[allow(clippy::absurd_extreme_comparisons)]
12939 #[allow(unused_comparisons)]
12940 if __tmp.remaining() < Self::ENCODED_LEN {
12941 panic!(
12942 "buffer is too small (need {} bytes, but got {})",
12943 Self::ENCODED_LEN,
12944 __tmp.remaining(),
12945 )
12946 }
12947 __tmp.put_u32_le(self.time_boot_ms);
12948 __tmp.put_u16_le(self.min_distance);
12949 __tmp.put_u16_le(self.max_distance);
12950 __tmp.put_u16_le(self.current_distance);
12951 __tmp.put_u8(self.mavtype as u8);
12952 __tmp.put_u8(self.id);
12953 __tmp.put_u8(self.orientation as u8);
12954 __tmp.put_u8(self.covariance);
12955 if matches!(version, MavlinkVersion::V2) {
12956 __tmp.put_f32_le(self.horizontal_fov);
12957 __tmp.put_f32_le(self.vertical_fov);
12958 for val in &self.quaternion {
12959 __tmp.put_f32_le(*val);
12960 }
12961 __tmp.put_u8(self.signal_quality);
12962 let len = __tmp.len();
12963 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12964 } else {
12965 __tmp.len()
12966 }
12967 }
12968}
12969#[doc = "EFI status output."]
12970#[doc = ""]
12971#[doc = "ID: 225"]
12972#[derive(Debug, Clone, PartialEq)]
12973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12975#[cfg_attr(feature = "ts", derive(TS))]
12976#[cfg_attr(feature = "ts", ts(export))]
12977pub struct EFI_STATUS_DATA {
12978 #[doc = "ECU index"]
12979 pub ecu_index: f32,
12980 #[doc = "RPM"]
12981 pub rpm: f32,
12982 #[doc = "Fuel consumed"]
12983 pub fuel_consumed: f32,
12984 #[doc = "Fuel flow rate"]
12985 pub fuel_flow: f32,
12986 #[doc = "Engine load"]
12987 pub engine_load: f32,
12988 #[doc = "Throttle position"]
12989 pub throttle_position: f32,
12990 #[doc = "Spark dwell time"]
12991 pub spark_dwell_time: f32,
12992 #[doc = "Barometric pressure"]
12993 pub barometric_pressure: f32,
12994 #[doc = "Intake manifold pressure("]
12995 pub intake_manifold_pressure: f32,
12996 #[doc = "Intake manifold temperature"]
12997 pub intake_manifold_temperature: f32,
12998 #[doc = "Cylinder head temperature"]
12999 pub cylinder_head_temperature: f32,
13000 #[doc = "Ignition timing (Crank angle degrees)"]
13001 pub ignition_timing: f32,
13002 #[doc = "Injection time"]
13003 pub injection_time: f32,
13004 #[doc = "Exhaust gas temperature"]
13005 pub exhaust_gas_temperature: f32,
13006 #[doc = "Output throttle"]
13007 pub throttle_out: f32,
13008 #[doc = "Pressure/temperature compensation"]
13009 pub pt_compensation: f32,
13010 #[doc = "EFI health status"]
13011 pub health: u8,
13012 #[doc = "Supply voltage to EFI sparking system. Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
13013 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13014 pub ignition_voltage: f32,
13015 #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
13016 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13017 pub fuel_pressure: f32,
13018}
13019impl EFI_STATUS_DATA {
13020 pub const ENCODED_LEN: usize = 73usize;
13021 pub const DEFAULT: Self = Self {
13022 ecu_index: 0.0_f32,
13023 rpm: 0.0_f32,
13024 fuel_consumed: 0.0_f32,
13025 fuel_flow: 0.0_f32,
13026 engine_load: 0.0_f32,
13027 throttle_position: 0.0_f32,
13028 spark_dwell_time: 0.0_f32,
13029 barometric_pressure: 0.0_f32,
13030 intake_manifold_pressure: 0.0_f32,
13031 intake_manifold_temperature: 0.0_f32,
13032 cylinder_head_temperature: 0.0_f32,
13033 ignition_timing: 0.0_f32,
13034 injection_time: 0.0_f32,
13035 exhaust_gas_temperature: 0.0_f32,
13036 throttle_out: 0.0_f32,
13037 pt_compensation: 0.0_f32,
13038 health: 0_u8,
13039 ignition_voltage: 0.0_f32,
13040 fuel_pressure: 0.0_f32,
13041 };
13042 #[cfg(feature = "arbitrary")]
13043 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13044 use arbitrary::{Arbitrary, Unstructured};
13045 let mut buf = [0u8; 1024];
13046 rng.fill_bytes(&mut buf);
13047 let mut unstructured = Unstructured::new(&buf);
13048 Self::arbitrary(&mut unstructured).unwrap_or_default()
13049 }
13050}
13051impl Default for EFI_STATUS_DATA {
13052 fn default() -> Self {
13053 Self::DEFAULT.clone()
13054 }
13055}
13056impl MessageData for EFI_STATUS_DATA {
13057 type Message = MavMessage;
13058 const ID: u32 = 225u32;
13059 const NAME: &'static str = "EFI_STATUS";
13060 const EXTRA_CRC: u8 = 208u8;
13061 const ENCODED_LEN: usize = 73usize;
13062 fn deser(
13063 _version: MavlinkVersion,
13064 __input: &[u8],
13065 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13066 let avail_len = __input.len();
13067 let mut payload_buf = [0; Self::ENCODED_LEN];
13068 let mut buf = if avail_len < Self::ENCODED_LEN {
13069 payload_buf[0..avail_len].copy_from_slice(__input);
13070 Bytes::new(&payload_buf)
13071 } else {
13072 Bytes::new(__input)
13073 };
13074 let mut __struct = Self::default();
13075 __struct.ecu_index = buf.get_f32_le()?;
13076 __struct.rpm = buf.get_f32_le()?;
13077 __struct.fuel_consumed = buf.get_f32_le()?;
13078 __struct.fuel_flow = buf.get_f32_le()?;
13079 __struct.engine_load = buf.get_f32_le()?;
13080 __struct.throttle_position = buf.get_f32_le()?;
13081 __struct.spark_dwell_time = buf.get_f32_le()?;
13082 __struct.barometric_pressure = buf.get_f32_le()?;
13083 __struct.intake_manifold_pressure = buf.get_f32_le()?;
13084 __struct.intake_manifold_temperature = buf.get_f32_le()?;
13085 __struct.cylinder_head_temperature = buf.get_f32_le()?;
13086 __struct.ignition_timing = buf.get_f32_le()?;
13087 __struct.injection_time = buf.get_f32_le()?;
13088 __struct.exhaust_gas_temperature = buf.get_f32_le()?;
13089 __struct.throttle_out = buf.get_f32_le()?;
13090 __struct.pt_compensation = buf.get_f32_le()?;
13091 __struct.health = buf.get_u8()?;
13092 __struct.ignition_voltage = buf.get_f32_le()?;
13093 __struct.fuel_pressure = buf.get_f32_le()?;
13094 Ok(__struct)
13095 }
13096 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13097 let mut __tmp = BytesMut::new(bytes);
13098 #[allow(clippy::absurd_extreme_comparisons)]
13099 #[allow(unused_comparisons)]
13100 if __tmp.remaining() < Self::ENCODED_LEN {
13101 panic!(
13102 "buffer is too small (need {} bytes, but got {})",
13103 Self::ENCODED_LEN,
13104 __tmp.remaining(),
13105 )
13106 }
13107 __tmp.put_f32_le(self.ecu_index);
13108 __tmp.put_f32_le(self.rpm);
13109 __tmp.put_f32_le(self.fuel_consumed);
13110 __tmp.put_f32_le(self.fuel_flow);
13111 __tmp.put_f32_le(self.engine_load);
13112 __tmp.put_f32_le(self.throttle_position);
13113 __tmp.put_f32_le(self.spark_dwell_time);
13114 __tmp.put_f32_le(self.barometric_pressure);
13115 __tmp.put_f32_le(self.intake_manifold_pressure);
13116 __tmp.put_f32_le(self.intake_manifold_temperature);
13117 __tmp.put_f32_le(self.cylinder_head_temperature);
13118 __tmp.put_f32_le(self.ignition_timing);
13119 __tmp.put_f32_le(self.injection_time);
13120 __tmp.put_f32_le(self.exhaust_gas_temperature);
13121 __tmp.put_f32_le(self.throttle_out);
13122 __tmp.put_f32_le(self.pt_compensation);
13123 __tmp.put_u8(self.health);
13124 if matches!(version, MavlinkVersion::V2) {
13125 __tmp.put_f32_le(self.ignition_voltage);
13126 __tmp.put_f32_le(self.fuel_pressure);
13127 let len = __tmp.len();
13128 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13129 } else {
13130 __tmp.len()
13131 }
13132 }
13133}
13134#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
13135#[doc = ""]
13136#[doc = "ID: 131"]
13137#[derive(Debug, Clone, PartialEq)]
13138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13140#[cfg_attr(feature = "ts", derive(TS))]
13141#[cfg_attr(feature = "ts", ts(export))]
13142pub struct ENCAPSULATED_DATA_DATA {
13143 #[doc = "sequence number (starting with 0 on every transmission)"]
13144 pub seqnr: u16,
13145 #[doc = "image data bytes"]
13146 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13147 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13148 pub data: [u8; 253],
13149}
13150impl ENCAPSULATED_DATA_DATA {
13151 pub const ENCODED_LEN: usize = 255usize;
13152 pub const DEFAULT: Self = Self {
13153 seqnr: 0_u16,
13154 data: [0_u8; 253usize],
13155 };
13156 #[cfg(feature = "arbitrary")]
13157 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13158 use arbitrary::{Arbitrary, Unstructured};
13159 let mut buf = [0u8; 1024];
13160 rng.fill_bytes(&mut buf);
13161 let mut unstructured = Unstructured::new(&buf);
13162 Self::arbitrary(&mut unstructured).unwrap_or_default()
13163 }
13164}
13165impl Default for ENCAPSULATED_DATA_DATA {
13166 fn default() -> Self {
13167 Self::DEFAULT.clone()
13168 }
13169}
13170impl MessageData for ENCAPSULATED_DATA_DATA {
13171 type Message = MavMessage;
13172 const ID: u32 = 131u32;
13173 const NAME: &'static str = "ENCAPSULATED_DATA";
13174 const EXTRA_CRC: u8 = 223u8;
13175 const ENCODED_LEN: usize = 255usize;
13176 fn deser(
13177 _version: MavlinkVersion,
13178 __input: &[u8],
13179 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13180 let avail_len = __input.len();
13181 let mut payload_buf = [0; Self::ENCODED_LEN];
13182 let mut buf = if avail_len < Self::ENCODED_LEN {
13183 payload_buf[0..avail_len].copy_from_slice(__input);
13184 Bytes::new(&payload_buf)
13185 } else {
13186 Bytes::new(__input)
13187 };
13188 let mut __struct = Self::default();
13189 __struct.seqnr = buf.get_u16_le()?;
13190 for v in &mut __struct.data {
13191 let val = buf.get_u8()?;
13192 *v = val;
13193 }
13194 Ok(__struct)
13195 }
13196 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13197 let mut __tmp = BytesMut::new(bytes);
13198 #[allow(clippy::absurd_extreme_comparisons)]
13199 #[allow(unused_comparisons)]
13200 if __tmp.remaining() < Self::ENCODED_LEN {
13201 panic!(
13202 "buffer is too small (need {} bytes, but got {})",
13203 Self::ENCODED_LEN,
13204 __tmp.remaining(),
13205 )
13206 }
13207 __tmp.put_u16_le(self.seqnr);
13208 for val in &self.data {
13209 __tmp.put_u8(*val);
13210 }
13211 if matches!(version, MavlinkVersion::V2) {
13212 let len = __tmp.len();
13213 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13214 } else {
13215 __tmp.len()
13216 }
13217 }
13218}
13219#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
13220#[doc = ""]
13221#[doc = "ID: 290"]
13222#[derive(Debug, Clone, PartialEq)]
13223#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13224#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13225#[cfg_attr(feature = "ts", derive(TS))]
13226#[cfg_attr(feature = "ts", ts(export))]
13227pub struct ESC_INFO_DATA {
13228 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
13229 pub time_usec: u64,
13230 #[doc = "Number of reported errors by each ESC since boot."]
13231 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13232 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13233 pub error_count: [u32; 4],
13234 #[doc = "Counter of data packets received."]
13235 pub counter: u16,
13236 #[doc = "Bitmap of ESC failure flags."]
13237 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13238 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13239 pub failure_flags: [u16; 4],
13240 #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
13241 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13242 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13243 pub temperature: [i16; 4],
13244 #[doc = "Index of the first ESC in this message (ESC are indexed in motor order). minValue = 0, maxValue = 60, increment = 4."]
13245 pub index: u8,
13246 #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
13247 pub count: u8,
13248 #[doc = "Connection type protocol for all ESC."]
13249 pub connection_type: EscConnectionType,
13250 #[doc = "Information regarding online/offline status of each ESC."]
13251 pub info: u8,
13252}
13253impl ESC_INFO_DATA {
13254 pub const ENCODED_LEN: usize = 46usize;
13255 pub const DEFAULT: Self = Self {
13256 time_usec: 0_u64,
13257 error_count: [0_u32; 4usize],
13258 counter: 0_u16,
13259 failure_flags: [0_u16; 4usize],
13260 temperature: [0_i16; 4usize],
13261 index: 0_u8,
13262 count: 0_u8,
13263 connection_type: EscConnectionType::DEFAULT,
13264 info: 0_u8,
13265 };
13266 #[cfg(feature = "arbitrary")]
13267 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13268 use arbitrary::{Arbitrary, Unstructured};
13269 let mut buf = [0u8; 1024];
13270 rng.fill_bytes(&mut buf);
13271 let mut unstructured = Unstructured::new(&buf);
13272 Self::arbitrary(&mut unstructured).unwrap_or_default()
13273 }
13274}
13275impl Default for ESC_INFO_DATA {
13276 fn default() -> Self {
13277 Self::DEFAULT.clone()
13278 }
13279}
13280impl MessageData for ESC_INFO_DATA {
13281 type Message = MavMessage;
13282 const ID: u32 = 290u32;
13283 const NAME: &'static str = "ESC_INFO";
13284 const EXTRA_CRC: u8 = 251u8;
13285 const ENCODED_LEN: usize = 46usize;
13286 fn deser(
13287 _version: MavlinkVersion,
13288 __input: &[u8],
13289 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13290 let avail_len = __input.len();
13291 let mut payload_buf = [0; Self::ENCODED_LEN];
13292 let mut buf = if avail_len < Self::ENCODED_LEN {
13293 payload_buf[0..avail_len].copy_from_slice(__input);
13294 Bytes::new(&payload_buf)
13295 } else {
13296 Bytes::new(__input)
13297 };
13298 let mut __struct = Self::default();
13299 __struct.time_usec = buf.get_u64_le()?;
13300 for v in &mut __struct.error_count {
13301 let val = buf.get_u32_le()?;
13302 *v = val;
13303 }
13304 __struct.counter = buf.get_u16_le()?;
13305 for v in &mut __struct.failure_flags {
13306 let val = buf.get_u16_le()?;
13307 *v = val;
13308 }
13309 for v in &mut __struct.temperature {
13310 let val = buf.get_i16_le()?;
13311 *v = val;
13312 }
13313 __struct.index = buf.get_u8()?;
13314 __struct.count = buf.get_u8()?;
13315 let tmp = buf.get_u8()?;
13316 __struct.connection_type =
13317 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13318 enum_type: "EscConnectionType",
13319 value: tmp as u64,
13320 })?;
13321 __struct.info = buf.get_u8()?;
13322 Ok(__struct)
13323 }
13324 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13325 let mut __tmp = BytesMut::new(bytes);
13326 #[allow(clippy::absurd_extreme_comparisons)]
13327 #[allow(unused_comparisons)]
13328 if __tmp.remaining() < Self::ENCODED_LEN {
13329 panic!(
13330 "buffer is too small (need {} bytes, but got {})",
13331 Self::ENCODED_LEN,
13332 __tmp.remaining(),
13333 )
13334 }
13335 __tmp.put_u64_le(self.time_usec);
13336 for val in &self.error_count {
13337 __tmp.put_u32_le(*val);
13338 }
13339 __tmp.put_u16_le(self.counter);
13340 for val in &self.failure_flags {
13341 __tmp.put_u16_le(*val);
13342 }
13343 for val in &self.temperature {
13344 __tmp.put_i16_le(*val);
13345 }
13346 __tmp.put_u8(self.index);
13347 __tmp.put_u8(self.count);
13348 __tmp.put_u8(self.connection_type as u8);
13349 __tmp.put_u8(self.info);
13350 if matches!(version, MavlinkVersion::V2) {
13351 let len = __tmp.len();
13352 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13353 } else {
13354 __tmp.len()
13355 }
13356 }
13357}
13358#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
13359#[doc = ""]
13360#[doc = "ID: 291"]
13361#[derive(Debug, Clone, PartialEq)]
13362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13364#[cfg_attr(feature = "ts", derive(TS))]
13365#[cfg_attr(feature = "ts", ts(export))]
13366pub struct ESC_STATUS_DATA {
13367 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
13368 pub time_usec: u64,
13369 #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
13370 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13371 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13372 pub rpm: [i32; 4],
13373 #[doc = "Voltage measured from each ESC."]
13374 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13375 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13376 pub voltage: [f32; 4],
13377 #[doc = "Current measured from each ESC."]
13378 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13379 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13380 pub current: [f32; 4],
13381 #[doc = "Index of the first ESC in this message (ESC are indexed in motor order). minValue = 0, maxValue = 60, increment = 4."]
13382 pub index: u8,
13383}
13384impl ESC_STATUS_DATA {
13385 pub const ENCODED_LEN: usize = 57usize;
13386 pub const DEFAULT: Self = Self {
13387 time_usec: 0_u64,
13388 rpm: [0_i32; 4usize],
13389 voltage: [0.0_f32; 4usize],
13390 current: [0.0_f32; 4usize],
13391 index: 0_u8,
13392 };
13393 #[cfg(feature = "arbitrary")]
13394 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13395 use arbitrary::{Arbitrary, Unstructured};
13396 let mut buf = [0u8; 1024];
13397 rng.fill_bytes(&mut buf);
13398 let mut unstructured = Unstructured::new(&buf);
13399 Self::arbitrary(&mut unstructured).unwrap_or_default()
13400 }
13401}
13402impl Default for ESC_STATUS_DATA {
13403 fn default() -> Self {
13404 Self::DEFAULT.clone()
13405 }
13406}
13407impl MessageData for ESC_STATUS_DATA {
13408 type Message = MavMessage;
13409 const ID: u32 = 291u32;
13410 const NAME: &'static str = "ESC_STATUS";
13411 const EXTRA_CRC: u8 = 10u8;
13412 const ENCODED_LEN: usize = 57usize;
13413 fn deser(
13414 _version: MavlinkVersion,
13415 __input: &[u8],
13416 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13417 let avail_len = __input.len();
13418 let mut payload_buf = [0; Self::ENCODED_LEN];
13419 let mut buf = if avail_len < Self::ENCODED_LEN {
13420 payload_buf[0..avail_len].copy_from_slice(__input);
13421 Bytes::new(&payload_buf)
13422 } else {
13423 Bytes::new(__input)
13424 };
13425 let mut __struct = Self::default();
13426 __struct.time_usec = buf.get_u64_le()?;
13427 for v in &mut __struct.rpm {
13428 let val = buf.get_i32_le()?;
13429 *v = val;
13430 }
13431 for v in &mut __struct.voltage {
13432 let val = buf.get_f32_le()?;
13433 *v = val;
13434 }
13435 for v in &mut __struct.current {
13436 let val = buf.get_f32_le()?;
13437 *v = val;
13438 }
13439 __struct.index = buf.get_u8()?;
13440 Ok(__struct)
13441 }
13442 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13443 let mut __tmp = BytesMut::new(bytes);
13444 #[allow(clippy::absurd_extreme_comparisons)]
13445 #[allow(unused_comparisons)]
13446 if __tmp.remaining() < Self::ENCODED_LEN {
13447 panic!(
13448 "buffer is too small (need {} bytes, but got {})",
13449 Self::ENCODED_LEN,
13450 __tmp.remaining(),
13451 )
13452 }
13453 __tmp.put_u64_le(self.time_usec);
13454 for val in &self.rpm {
13455 __tmp.put_i32_le(*val);
13456 }
13457 for val in &self.voltage {
13458 __tmp.put_f32_le(*val);
13459 }
13460 for val in &self.current {
13461 __tmp.put_f32_le(*val);
13462 }
13463 __tmp.put_u8(self.index);
13464 if matches!(version, MavlinkVersion::V2) {
13465 let len = __tmp.len();
13466 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13467 } else {
13468 __tmp.len()
13469 }
13470 }
13471}
13472#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
13473#[doc = ""]
13474#[doc = "ID: 230"]
13475#[derive(Debug, Clone, PartialEq)]
13476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13478#[cfg_attr(feature = "ts", derive(TS))]
13479#[cfg_attr(feature = "ts", ts(export))]
13480pub struct ESTIMATOR_STATUS_DATA {
13481 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13482 pub time_usec: u64,
13483 #[doc = "Velocity innovation test ratio"]
13484 pub vel_ratio: f32,
13485 #[doc = "Horizontal position innovation test ratio"]
13486 pub pos_horiz_ratio: f32,
13487 #[doc = "Vertical position innovation test ratio"]
13488 pub pos_vert_ratio: f32,
13489 #[doc = "Magnetometer innovation test ratio"]
13490 pub mag_ratio: f32,
13491 #[doc = "Height above terrain innovation test ratio"]
13492 pub hagl_ratio: f32,
13493 #[doc = "True airspeed innovation test ratio"]
13494 pub tas_ratio: f32,
13495 #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
13496 pub pos_horiz_accuracy: f32,
13497 #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
13498 pub pos_vert_accuracy: f32,
13499 #[doc = "Bitmap indicating which EKF outputs are valid."]
13500 pub flags: EstimatorStatusFlags,
13501}
13502impl ESTIMATOR_STATUS_DATA {
13503 pub const ENCODED_LEN: usize = 42usize;
13504 pub const DEFAULT: Self = Self {
13505 time_usec: 0_u64,
13506 vel_ratio: 0.0_f32,
13507 pos_horiz_ratio: 0.0_f32,
13508 pos_vert_ratio: 0.0_f32,
13509 mag_ratio: 0.0_f32,
13510 hagl_ratio: 0.0_f32,
13511 tas_ratio: 0.0_f32,
13512 pos_horiz_accuracy: 0.0_f32,
13513 pos_vert_accuracy: 0.0_f32,
13514 flags: EstimatorStatusFlags::DEFAULT,
13515 };
13516 #[cfg(feature = "arbitrary")]
13517 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13518 use arbitrary::{Arbitrary, Unstructured};
13519 let mut buf = [0u8; 1024];
13520 rng.fill_bytes(&mut buf);
13521 let mut unstructured = Unstructured::new(&buf);
13522 Self::arbitrary(&mut unstructured).unwrap_or_default()
13523 }
13524}
13525impl Default for ESTIMATOR_STATUS_DATA {
13526 fn default() -> Self {
13527 Self::DEFAULT.clone()
13528 }
13529}
13530impl MessageData for ESTIMATOR_STATUS_DATA {
13531 type Message = MavMessage;
13532 const ID: u32 = 230u32;
13533 const NAME: &'static str = "ESTIMATOR_STATUS";
13534 const EXTRA_CRC: u8 = 163u8;
13535 const ENCODED_LEN: usize = 42usize;
13536 fn deser(
13537 _version: MavlinkVersion,
13538 __input: &[u8],
13539 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13540 let avail_len = __input.len();
13541 let mut payload_buf = [0; Self::ENCODED_LEN];
13542 let mut buf = if avail_len < Self::ENCODED_LEN {
13543 payload_buf[0..avail_len].copy_from_slice(__input);
13544 Bytes::new(&payload_buf)
13545 } else {
13546 Bytes::new(__input)
13547 };
13548 let mut __struct = Self::default();
13549 __struct.time_usec = buf.get_u64_le()?;
13550 __struct.vel_ratio = buf.get_f32_le()?;
13551 __struct.pos_horiz_ratio = buf.get_f32_le()?;
13552 __struct.pos_vert_ratio = buf.get_f32_le()?;
13553 __struct.mag_ratio = buf.get_f32_le()?;
13554 __struct.hagl_ratio = buf.get_f32_le()?;
13555 __struct.tas_ratio = buf.get_f32_le()?;
13556 __struct.pos_horiz_accuracy = buf.get_f32_le()?;
13557 __struct.pos_vert_accuracy = buf.get_f32_le()?;
13558 let tmp = buf.get_u16_le()?;
13559 __struct.flags = EstimatorStatusFlags::from_bits(
13560 tmp as <EstimatorStatusFlags as Flags>::Bits,
13561 )
13562 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13563 flag_type: "EstimatorStatusFlags",
13564 value: tmp as u64,
13565 })?;
13566 Ok(__struct)
13567 }
13568 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13569 let mut __tmp = BytesMut::new(bytes);
13570 #[allow(clippy::absurd_extreme_comparisons)]
13571 #[allow(unused_comparisons)]
13572 if __tmp.remaining() < Self::ENCODED_LEN {
13573 panic!(
13574 "buffer is too small (need {} bytes, but got {})",
13575 Self::ENCODED_LEN,
13576 __tmp.remaining(),
13577 )
13578 }
13579 __tmp.put_u64_le(self.time_usec);
13580 __tmp.put_f32_le(self.vel_ratio);
13581 __tmp.put_f32_le(self.pos_horiz_ratio);
13582 __tmp.put_f32_le(self.pos_vert_ratio);
13583 __tmp.put_f32_le(self.mag_ratio);
13584 __tmp.put_f32_le(self.hagl_ratio);
13585 __tmp.put_f32_le(self.tas_ratio);
13586 __tmp.put_f32_le(self.pos_horiz_accuracy);
13587 __tmp.put_f32_le(self.pos_vert_accuracy);
13588 __tmp.put_u16_le(self.flags.bits() as u16);
13589 if matches!(version, MavlinkVersion::V2) {
13590 let len = __tmp.len();
13591 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13592 } else {
13593 __tmp.len()
13594 }
13595 }
13596}
13597#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
13598#[doc = ""]
13599#[doc = "ID: 410"]
13600#[derive(Debug, Clone, PartialEq)]
13601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13603#[cfg_attr(feature = "ts", derive(TS))]
13604#[cfg_attr(feature = "ts", ts(export))]
13605pub struct EVENT_DATA {
13606 #[doc = "Event ID (as defined in the component metadata)"]
13607 pub id: u32,
13608 #[doc = "Timestamp (time since system boot when the event happened)."]
13609 pub event_time_boot_ms: u32,
13610 #[doc = "Sequence number."]
13611 pub sequence: u16,
13612 #[doc = "Component ID"]
13613 pub destination_component: u8,
13614 #[doc = "System ID"]
13615 pub destination_system: u8,
13616 #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
13617 pub log_levels: u8,
13618 #[doc = "Arguments (depend on event ID)."]
13619 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13620 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13621 pub arguments: [u8; 40],
13622}
13623impl EVENT_DATA {
13624 pub const ENCODED_LEN: usize = 53usize;
13625 pub const DEFAULT: Self = Self {
13626 id: 0_u32,
13627 event_time_boot_ms: 0_u32,
13628 sequence: 0_u16,
13629 destination_component: 0_u8,
13630 destination_system: 0_u8,
13631 log_levels: 0_u8,
13632 arguments: [0_u8; 40usize],
13633 };
13634 #[cfg(feature = "arbitrary")]
13635 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13636 use arbitrary::{Arbitrary, Unstructured};
13637 let mut buf = [0u8; 1024];
13638 rng.fill_bytes(&mut buf);
13639 let mut unstructured = Unstructured::new(&buf);
13640 Self::arbitrary(&mut unstructured).unwrap_or_default()
13641 }
13642}
13643impl Default for EVENT_DATA {
13644 fn default() -> Self {
13645 Self::DEFAULT.clone()
13646 }
13647}
13648impl MessageData for EVENT_DATA {
13649 type Message = MavMessage;
13650 const ID: u32 = 410u32;
13651 const NAME: &'static str = "EVENT";
13652 const EXTRA_CRC: u8 = 160u8;
13653 const ENCODED_LEN: usize = 53usize;
13654 fn deser(
13655 _version: MavlinkVersion,
13656 __input: &[u8],
13657 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13658 let avail_len = __input.len();
13659 let mut payload_buf = [0; Self::ENCODED_LEN];
13660 let mut buf = if avail_len < Self::ENCODED_LEN {
13661 payload_buf[0..avail_len].copy_from_slice(__input);
13662 Bytes::new(&payload_buf)
13663 } else {
13664 Bytes::new(__input)
13665 };
13666 let mut __struct = Self::default();
13667 __struct.id = buf.get_u32_le()?;
13668 __struct.event_time_boot_ms = buf.get_u32_le()?;
13669 __struct.sequence = buf.get_u16_le()?;
13670 __struct.destination_component = buf.get_u8()?;
13671 __struct.destination_system = buf.get_u8()?;
13672 __struct.log_levels = buf.get_u8()?;
13673 for v in &mut __struct.arguments {
13674 let val = buf.get_u8()?;
13675 *v = val;
13676 }
13677 Ok(__struct)
13678 }
13679 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13680 let mut __tmp = BytesMut::new(bytes);
13681 #[allow(clippy::absurd_extreme_comparisons)]
13682 #[allow(unused_comparisons)]
13683 if __tmp.remaining() < Self::ENCODED_LEN {
13684 panic!(
13685 "buffer is too small (need {} bytes, but got {})",
13686 Self::ENCODED_LEN,
13687 __tmp.remaining(),
13688 )
13689 }
13690 __tmp.put_u32_le(self.id);
13691 __tmp.put_u32_le(self.event_time_boot_ms);
13692 __tmp.put_u16_le(self.sequence);
13693 __tmp.put_u8(self.destination_component);
13694 __tmp.put_u8(self.destination_system);
13695 __tmp.put_u8(self.log_levels);
13696 for val in &self.arguments {
13697 __tmp.put_u8(*val);
13698 }
13699 if matches!(version, MavlinkVersion::V2) {
13700 let len = __tmp.len();
13701 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13702 } else {
13703 __tmp.len()
13704 }
13705 }
13706}
13707#[doc = "Provides state for additional features."]
13708#[doc = ""]
13709#[doc = "ID: 245"]
13710#[derive(Debug, Clone, PartialEq)]
13711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13713#[cfg_attr(feature = "ts", derive(TS))]
13714#[cfg_attr(feature = "ts", ts(export))]
13715pub struct EXTENDED_SYS_STATE_DATA {
13716 #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
13717 pub vtol_state: MavVtolState,
13718 #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
13719 pub landed_state: MavLandedState,
13720}
13721impl EXTENDED_SYS_STATE_DATA {
13722 pub const ENCODED_LEN: usize = 2usize;
13723 pub const DEFAULT: Self = Self {
13724 vtol_state: MavVtolState::DEFAULT,
13725 landed_state: MavLandedState::DEFAULT,
13726 };
13727 #[cfg(feature = "arbitrary")]
13728 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13729 use arbitrary::{Arbitrary, Unstructured};
13730 let mut buf = [0u8; 1024];
13731 rng.fill_bytes(&mut buf);
13732 let mut unstructured = Unstructured::new(&buf);
13733 Self::arbitrary(&mut unstructured).unwrap_or_default()
13734 }
13735}
13736impl Default for EXTENDED_SYS_STATE_DATA {
13737 fn default() -> Self {
13738 Self::DEFAULT.clone()
13739 }
13740}
13741impl MessageData for EXTENDED_SYS_STATE_DATA {
13742 type Message = MavMessage;
13743 const ID: u32 = 245u32;
13744 const NAME: &'static str = "EXTENDED_SYS_STATE";
13745 const EXTRA_CRC: u8 = 130u8;
13746 const ENCODED_LEN: usize = 2usize;
13747 fn deser(
13748 _version: MavlinkVersion,
13749 __input: &[u8],
13750 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13751 let avail_len = __input.len();
13752 let mut payload_buf = [0; Self::ENCODED_LEN];
13753 let mut buf = if avail_len < Self::ENCODED_LEN {
13754 payload_buf[0..avail_len].copy_from_slice(__input);
13755 Bytes::new(&payload_buf)
13756 } else {
13757 Bytes::new(__input)
13758 };
13759 let mut __struct = Self::default();
13760 let tmp = buf.get_u8()?;
13761 __struct.vtol_state =
13762 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13763 enum_type: "MavVtolState",
13764 value: tmp as u64,
13765 })?;
13766 let tmp = buf.get_u8()?;
13767 __struct.landed_state =
13768 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13769 enum_type: "MavLandedState",
13770 value: tmp as u64,
13771 })?;
13772 Ok(__struct)
13773 }
13774 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13775 let mut __tmp = BytesMut::new(bytes);
13776 #[allow(clippy::absurd_extreme_comparisons)]
13777 #[allow(unused_comparisons)]
13778 if __tmp.remaining() < Self::ENCODED_LEN {
13779 panic!(
13780 "buffer is too small (need {} bytes, but got {})",
13781 Self::ENCODED_LEN,
13782 __tmp.remaining(),
13783 )
13784 }
13785 __tmp.put_u8(self.vtol_state as u8);
13786 __tmp.put_u8(self.landed_state as u8);
13787 if matches!(version, MavlinkVersion::V2) {
13788 let len = __tmp.len();
13789 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13790 } else {
13791 __tmp.len()
13792 }
13793 }
13794}
13795#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
13796#[doc = ""]
13797#[doc = "ID: 162"]
13798#[derive(Debug, Clone, PartialEq)]
13799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13801#[cfg_attr(feature = "ts", derive(TS))]
13802#[cfg_attr(feature = "ts", ts(export))]
13803pub struct FENCE_STATUS_DATA {
13804 #[doc = "Time (since boot) of last breach."]
13805 pub breach_time: u32,
13806 #[doc = "Number of fence breaches."]
13807 pub breach_count: u16,
13808 #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
13809 pub breach_status: u8,
13810 #[doc = "Last breach type."]
13811 pub breach_type: FenceBreach,
13812 #[doc = "Active action to prevent fence breach"]
13813 #[cfg_attr(feature = "serde", serde(default))]
13814 pub breach_mitigation: FenceMitigate,
13815}
13816impl FENCE_STATUS_DATA {
13817 pub const ENCODED_LEN: usize = 9usize;
13818 pub const DEFAULT: Self = Self {
13819 breach_time: 0_u32,
13820 breach_count: 0_u16,
13821 breach_status: 0_u8,
13822 breach_type: FenceBreach::DEFAULT,
13823 breach_mitigation: FenceMitigate::DEFAULT,
13824 };
13825 #[cfg(feature = "arbitrary")]
13826 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13827 use arbitrary::{Arbitrary, Unstructured};
13828 let mut buf = [0u8; 1024];
13829 rng.fill_bytes(&mut buf);
13830 let mut unstructured = Unstructured::new(&buf);
13831 Self::arbitrary(&mut unstructured).unwrap_or_default()
13832 }
13833}
13834impl Default for FENCE_STATUS_DATA {
13835 fn default() -> Self {
13836 Self::DEFAULT.clone()
13837 }
13838}
13839impl MessageData for FENCE_STATUS_DATA {
13840 type Message = MavMessage;
13841 const ID: u32 = 162u32;
13842 const NAME: &'static str = "FENCE_STATUS";
13843 const EXTRA_CRC: u8 = 189u8;
13844 const ENCODED_LEN: usize = 9usize;
13845 fn deser(
13846 _version: MavlinkVersion,
13847 __input: &[u8],
13848 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13849 let avail_len = __input.len();
13850 let mut payload_buf = [0; Self::ENCODED_LEN];
13851 let mut buf = if avail_len < Self::ENCODED_LEN {
13852 payload_buf[0..avail_len].copy_from_slice(__input);
13853 Bytes::new(&payload_buf)
13854 } else {
13855 Bytes::new(__input)
13856 };
13857 let mut __struct = Self::default();
13858 __struct.breach_time = buf.get_u32_le()?;
13859 __struct.breach_count = buf.get_u16_le()?;
13860 __struct.breach_status = buf.get_u8()?;
13861 let tmp = buf.get_u8()?;
13862 __struct.breach_type =
13863 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13864 enum_type: "FenceBreach",
13865 value: tmp as u64,
13866 })?;
13867 let tmp = buf.get_u8()?;
13868 __struct.breach_mitigation =
13869 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13870 enum_type: "FenceMitigate",
13871 value: tmp as u64,
13872 })?;
13873 Ok(__struct)
13874 }
13875 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13876 let mut __tmp = BytesMut::new(bytes);
13877 #[allow(clippy::absurd_extreme_comparisons)]
13878 #[allow(unused_comparisons)]
13879 if __tmp.remaining() < Self::ENCODED_LEN {
13880 panic!(
13881 "buffer is too small (need {} bytes, but got {})",
13882 Self::ENCODED_LEN,
13883 __tmp.remaining(),
13884 )
13885 }
13886 __tmp.put_u32_le(self.breach_time);
13887 __tmp.put_u16_le(self.breach_count);
13888 __tmp.put_u8(self.breach_status);
13889 __tmp.put_u8(self.breach_type as u8);
13890 if matches!(version, MavlinkVersion::V2) {
13891 __tmp.put_u8(self.breach_mitigation as u8);
13892 let len = __tmp.len();
13893 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13894 } else {
13895 __tmp.len()
13896 }
13897 }
13898}
13899#[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT). This may typically send at low rates: of the order of 2Hz."]
13900#[doc = ""]
13901#[doc = "ID: 361"]
13902#[derive(Debug, Clone, PartialEq)]
13903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13905#[cfg_attr(feature = "ts", derive(TS))]
13906#[cfg_attr(feature = "ts", ts(export))]
13907pub struct FIGURE_EIGHT_EXECUTION_STATUS_DATA {
13908 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13909 pub time_usec: u64,
13910 #[doc = "Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise."]
13911 pub major_radius: f32,
13912 #[doc = "Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure."]
13913 pub minor_radius: f32,
13914 #[doc = "Orientation of the figure eight major axis with respect to true north in [-pi,pi)."]
13915 pub orientation: f32,
13916 #[doc = "X coordinate of center point. Coordinate system depends on frame field."]
13917 pub x: i32,
13918 #[doc = "Y coordinate of center point. Coordinate system depends on frame field."]
13919 pub y: i32,
13920 #[doc = "Altitude of center point. Coordinate system depends on frame field."]
13921 pub z: f32,
13922 #[doc = "The coordinate system of the fields: x, y, z."]
13923 pub frame: MavFrame,
13924}
13925impl FIGURE_EIGHT_EXECUTION_STATUS_DATA {
13926 pub const ENCODED_LEN: usize = 33usize;
13927 pub const DEFAULT: Self = Self {
13928 time_usec: 0_u64,
13929 major_radius: 0.0_f32,
13930 minor_radius: 0.0_f32,
13931 orientation: 0.0_f32,
13932 x: 0_i32,
13933 y: 0_i32,
13934 z: 0.0_f32,
13935 frame: MavFrame::DEFAULT,
13936 };
13937 #[cfg(feature = "arbitrary")]
13938 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13939 use arbitrary::{Arbitrary, Unstructured};
13940 let mut buf = [0u8; 1024];
13941 rng.fill_bytes(&mut buf);
13942 let mut unstructured = Unstructured::new(&buf);
13943 Self::arbitrary(&mut unstructured).unwrap_or_default()
13944 }
13945}
13946impl Default for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
13947 fn default() -> Self {
13948 Self::DEFAULT.clone()
13949 }
13950}
13951impl MessageData for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
13952 type Message = MavMessage;
13953 const ID: u32 = 361u32;
13954 const NAME: &'static str = "FIGURE_EIGHT_EXECUTION_STATUS";
13955 const EXTRA_CRC: u8 = 93u8;
13956 const ENCODED_LEN: usize = 33usize;
13957 fn deser(
13958 _version: MavlinkVersion,
13959 __input: &[u8],
13960 ) -> Result<Self, ::mavlink_core::error::ParserError> {
13961 let avail_len = __input.len();
13962 let mut payload_buf = [0; Self::ENCODED_LEN];
13963 let mut buf = if avail_len < Self::ENCODED_LEN {
13964 payload_buf[0..avail_len].copy_from_slice(__input);
13965 Bytes::new(&payload_buf)
13966 } else {
13967 Bytes::new(__input)
13968 };
13969 let mut __struct = Self::default();
13970 __struct.time_usec = buf.get_u64_le()?;
13971 __struct.major_radius = buf.get_f32_le()?;
13972 __struct.minor_radius = buf.get_f32_le()?;
13973 __struct.orientation = buf.get_f32_le()?;
13974 __struct.x = buf.get_i32_le()?;
13975 __struct.y = buf.get_i32_le()?;
13976 __struct.z = buf.get_f32_le()?;
13977 let tmp = buf.get_u8()?;
13978 __struct.frame =
13979 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13980 enum_type: "MavFrame",
13981 value: tmp as u64,
13982 })?;
13983 Ok(__struct)
13984 }
13985 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13986 let mut __tmp = BytesMut::new(bytes);
13987 #[allow(clippy::absurd_extreme_comparisons)]
13988 #[allow(unused_comparisons)]
13989 if __tmp.remaining() < Self::ENCODED_LEN {
13990 panic!(
13991 "buffer is too small (need {} bytes, but got {})",
13992 Self::ENCODED_LEN,
13993 __tmp.remaining(),
13994 )
13995 }
13996 __tmp.put_u64_le(self.time_usec);
13997 __tmp.put_f32_le(self.major_radius);
13998 __tmp.put_f32_le(self.minor_radius);
13999 __tmp.put_f32_le(self.orientation);
14000 __tmp.put_i32_le(self.x);
14001 __tmp.put_i32_le(self.y);
14002 __tmp.put_f32_le(self.z);
14003 __tmp.put_u8(self.frame as u8);
14004 if matches!(version, MavlinkVersion::V2) {
14005 let len = __tmp.len();
14006 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14007 } else {
14008 __tmp.len()
14009 }
14010 }
14011}
14012#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
14013#[doc = ""]
14014#[doc = "ID: 110"]
14015#[derive(Debug, Clone, PartialEq)]
14016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14018#[cfg_attr(feature = "ts", derive(TS))]
14019#[cfg_attr(feature = "ts", ts(export))]
14020pub struct FILE_TRANSFER_PROTOCOL_DATA {
14021 #[doc = "Network ID (0 for broadcast)"]
14022 pub target_network: u8,
14023 #[doc = "System ID (0 for broadcast)"]
14024 pub target_system: u8,
14025 #[doc = "Component ID (0 for broadcast)"]
14026 pub target_component: u8,
14027 #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
14028 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14029 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14030 pub payload: [u8; 251],
14031}
14032impl FILE_TRANSFER_PROTOCOL_DATA {
14033 pub const ENCODED_LEN: usize = 254usize;
14034 pub const DEFAULT: Self = Self {
14035 target_network: 0_u8,
14036 target_system: 0_u8,
14037 target_component: 0_u8,
14038 payload: [0_u8; 251usize],
14039 };
14040 #[cfg(feature = "arbitrary")]
14041 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14042 use arbitrary::{Arbitrary, Unstructured};
14043 let mut buf = [0u8; 1024];
14044 rng.fill_bytes(&mut buf);
14045 let mut unstructured = Unstructured::new(&buf);
14046 Self::arbitrary(&mut unstructured).unwrap_or_default()
14047 }
14048}
14049impl Default for FILE_TRANSFER_PROTOCOL_DATA {
14050 fn default() -> Self {
14051 Self::DEFAULT.clone()
14052 }
14053}
14054impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
14055 type Message = MavMessage;
14056 const ID: u32 = 110u32;
14057 const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
14058 const EXTRA_CRC: u8 = 84u8;
14059 const ENCODED_LEN: usize = 254usize;
14060 fn deser(
14061 _version: MavlinkVersion,
14062 __input: &[u8],
14063 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14064 let avail_len = __input.len();
14065 let mut payload_buf = [0; Self::ENCODED_LEN];
14066 let mut buf = if avail_len < Self::ENCODED_LEN {
14067 payload_buf[0..avail_len].copy_from_slice(__input);
14068 Bytes::new(&payload_buf)
14069 } else {
14070 Bytes::new(__input)
14071 };
14072 let mut __struct = Self::default();
14073 __struct.target_network = buf.get_u8()?;
14074 __struct.target_system = buf.get_u8()?;
14075 __struct.target_component = buf.get_u8()?;
14076 for v in &mut __struct.payload {
14077 let val = buf.get_u8()?;
14078 *v = val;
14079 }
14080 Ok(__struct)
14081 }
14082 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14083 let mut __tmp = BytesMut::new(bytes);
14084 #[allow(clippy::absurd_extreme_comparisons)]
14085 #[allow(unused_comparisons)]
14086 if __tmp.remaining() < Self::ENCODED_LEN {
14087 panic!(
14088 "buffer is too small (need {} bytes, but got {})",
14089 Self::ENCODED_LEN,
14090 __tmp.remaining(),
14091 )
14092 }
14093 __tmp.put_u8(self.target_network);
14094 __tmp.put_u8(self.target_system);
14095 __tmp.put_u8(self.target_component);
14096 for val in &self.payload {
14097 __tmp.put_u8(*val);
14098 }
14099 if matches!(version, MavlinkVersion::V2) {
14100 let len = __tmp.len();
14101 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14102 } else {
14103 __tmp.len()
14104 }
14105 }
14106}
14107#[doc = "Flight information. This includes time since boot for arm, takeoff, and land, and a flight number. Takeoff and landing values reset to zero on arm. This can be requested using MAV_CMD_REQUEST_MESSAGE. Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
14108#[doc = ""]
14109#[doc = "ID: 264"]
14110#[derive(Debug, Clone, PartialEq)]
14111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14113#[cfg_attr(feature = "ts", derive(TS))]
14114#[cfg_attr(feature = "ts", ts(export))]
14115pub struct FLIGHT_INFORMATION_DATA {
14116 #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
14117 pub arming_time_utc: u64,
14118 #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
14119 pub takeoff_time_utc: u64,
14120 #[doc = "Flight number. Note, field is misnamed UUID."]
14121 pub flight_uuid: u64,
14122 #[doc = "Timestamp (time since system boot)."]
14123 pub time_boot_ms: u32,
14124 #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
14125 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14126 pub landing_time: u32,
14127}
14128impl FLIGHT_INFORMATION_DATA {
14129 pub const ENCODED_LEN: usize = 32usize;
14130 pub const DEFAULT: Self = Self {
14131 arming_time_utc: 0_u64,
14132 takeoff_time_utc: 0_u64,
14133 flight_uuid: 0_u64,
14134 time_boot_ms: 0_u32,
14135 landing_time: 0_u32,
14136 };
14137 #[cfg(feature = "arbitrary")]
14138 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14139 use arbitrary::{Arbitrary, Unstructured};
14140 let mut buf = [0u8; 1024];
14141 rng.fill_bytes(&mut buf);
14142 let mut unstructured = Unstructured::new(&buf);
14143 Self::arbitrary(&mut unstructured).unwrap_or_default()
14144 }
14145}
14146impl Default for FLIGHT_INFORMATION_DATA {
14147 fn default() -> Self {
14148 Self::DEFAULT.clone()
14149 }
14150}
14151impl MessageData for FLIGHT_INFORMATION_DATA {
14152 type Message = MavMessage;
14153 const ID: u32 = 264u32;
14154 const NAME: &'static str = "FLIGHT_INFORMATION";
14155 const EXTRA_CRC: u8 = 49u8;
14156 const ENCODED_LEN: usize = 32usize;
14157 fn deser(
14158 _version: MavlinkVersion,
14159 __input: &[u8],
14160 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14161 let avail_len = __input.len();
14162 let mut payload_buf = [0; Self::ENCODED_LEN];
14163 let mut buf = if avail_len < Self::ENCODED_LEN {
14164 payload_buf[0..avail_len].copy_from_slice(__input);
14165 Bytes::new(&payload_buf)
14166 } else {
14167 Bytes::new(__input)
14168 };
14169 let mut __struct = Self::default();
14170 __struct.arming_time_utc = buf.get_u64_le()?;
14171 __struct.takeoff_time_utc = buf.get_u64_le()?;
14172 __struct.flight_uuid = buf.get_u64_le()?;
14173 __struct.time_boot_ms = buf.get_u32_le()?;
14174 __struct.landing_time = buf.get_u32_le()?;
14175 Ok(__struct)
14176 }
14177 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14178 let mut __tmp = BytesMut::new(bytes);
14179 #[allow(clippy::absurd_extreme_comparisons)]
14180 #[allow(unused_comparisons)]
14181 if __tmp.remaining() < Self::ENCODED_LEN {
14182 panic!(
14183 "buffer is too small (need {} bytes, but got {})",
14184 Self::ENCODED_LEN,
14185 __tmp.remaining(),
14186 )
14187 }
14188 __tmp.put_u64_le(self.arming_time_utc);
14189 __tmp.put_u64_le(self.takeoff_time_utc);
14190 __tmp.put_u64_le(self.flight_uuid);
14191 __tmp.put_u32_le(self.time_boot_ms);
14192 if matches!(version, MavlinkVersion::V2) {
14193 __tmp.put_u32_le(self.landing_time);
14194 let len = __tmp.len();
14195 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14196 } else {
14197 __tmp.len()
14198 }
14199 }
14200}
14201#[doc = "Current motion information from a designated system."]
14202#[doc = ""]
14203#[doc = "ID: 144"]
14204#[derive(Debug, Clone, PartialEq)]
14205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14207#[cfg_attr(feature = "ts", derive(TS))]
14208#[cfg_attr(feature = "ts", ts(export))]
14209pub struct FOLLOW_TARGET_DATA {
14210 #[doc = "Timestamp (time since system boot)."]
14211 pub timestamp: u64,
14212 #[doc = "button states or switches of a tracker device"]
14213 pub custom_state: u64,
14214 #[doc = "Latitude (WGS84)"]
14215 pub lat: i32,
14216 #[doc = "Longitude (WGS84)"]
14217 pub lon: i32,
14218 #[doc = "Altitude (MSL)"]
14219 pub alt: f32,
14220 #[doc = "target velocity (0,0,0) for unknown"]
14221 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14222 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14223 pub vel: [f32; 3],
14224 #[doc = "linear target acceleration (0,0,0) for unknown"]
14225 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14226 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14227 pub acc: [f32; 3],
14228 #[doc = "(0 0 0 0 for unknown)"]
14229 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14230 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14231 pub attitude_q: [f32; 4],
14232 #[doc = "(0 0 0 for unknown)"]
14233 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14234 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14235 pub rates: [f32; 3],
14236 #[doc = "eph epv"]
14237 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14238 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14239 pub position_cov: [f32; 3],
14240 #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
14241 pub est_capabilities: u8,
14242}
14243impl FOLLOW_TARGET_DATA {
14244 pub const ENCODED_LEN: usize = 93usize;
14245 pub const DEFAULT: Self = Self {
14246 timestamp: 0_u64,
14247 custom_state: 0_u64,
14248 lat: 0_i32,
14249 lon: 0_i32,
14250 alt: 0.0_f32,
14251 vel: [0.0_f32; 3usize],
14252 acc: [0.0_f32; 3usize],
14253 attitude_q: [0.0_f32; 4usize],
14254 rates: [0.0_f32; 3usize],
14255 position_cov: [0.0_f32; 3usize],
14256 est_capabilities: 0_u8,
14257 };
14258 #[cfg(feature = "arbitrary")]
14259 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14260 use arbitrary::{Arbitrary, Unstructured};
14261 let mut buf = [0u8; 1024];
14262 rng.fill_bytes(&mut buf);
14263 let mut unstructured = Unstructured::new(&buf);
14264 Self::arbitrary(&mut unstructured).unwrap_or_default()
14265 }
14266}
14267impl Default for FOLLOW_TARGET_DATA {
14268 fn default() -> Self {
14269 Self::DEFAULT.clone()
14270 }
14271}
14272impl MessageData for FOLLOW_TARGET_DATA {
14273 type Message = MavMessage;
14274 const ID: u32 = 144u32;
14275 const NAME: &'static str = "FOLLOW_TARGET";
14276 const EXTRA_CRC: u8 = 127u8;
14277 const ENCODED_LEN: usize = 93usize;
14278 fn deser(
14279 _version: MavlinkVersion,
14280 __input: &[u8],
14281 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14282 let avail_len = __input.len();
14283 let mut payload_buf = [0; Self::ENCODED_LEN];
14284 let mut buf = if avail_len < Self::ENCODED_LEN {
14285 payload_buf[0..avail_len].copy_from_slice(__input);
14286 Bytes::new(&payload_buf)
14287 } else {
14288 Bytes::new(__input)
14289 };
14290 let mut __struct = Self::default();
14291 __struct.timestamp = buf.get_u64_le()?;
14292 __struct.custom_state = buf.get_u64_le()?;
14293 __struct.lat = buf.get_i32_le()?;
14294 __struct.lon = buf.get_i32_le()?;
14295 __struct.alt = buf.get_f32_le()?;
14296 for v in &mut __struct.vel {
14297 let val = buf.get_f32_le()?;
14298 *v = val;
14299 }
14300 for v in &mut __struct.acc {
14301 let val = buf.get_f32_le()?;
14302 *v = val;
14303 }
14304 for v in &mut __struct.attitude_q {
14305 let val = buf.get_f32_le()?;
14306 *v = val;
14307 }
14308 for v in &mut __struct.rates {
14309 let val = buf.get_f32_le()?;
14310 *v = val;
14311 }
14312 for v in &mut __struct.position_cov {
14313 let val = buf.get_f32_le()?;
14314 *v = val;
14315 }
14316 __struct.est_capabilities = buf.get_u8()?;
14317 Ok(__struct)
14318 }
14319 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14320 let mut __tmp = BytesMut::new(bytes);
14321 #[allow(clippy::absurd_extreme_comparisons)]
14322 #[allow(unused_comparisons)]
14323 if __tmp.remaining() < Self::ENCODED_LEN {
14324 panic!(
14325 "buffer is too small (need {} bytes, but got {})",
14326 Self::ENCODED_LEN,
14327 __tmp.remaining(),
14328 )
14329 }
14330 __tmp.put_u64_le(self.timestamp);
14331 __tmp.put_u64_le(self.custom_state);
14332 __tmp.put_i32_le(self.lat);
14333 __tmp.put_i32_le(self.lon);
14334 __tmp.put_f32_le(self.alt);
14335 for val in &self.vel {
14336 __tmp.put_f32_le(*val);
14337 }
14338 for val in &self.acc {
14339 __tmp.put_f32_le(*val);
14340 }
14341 for val in &self.attitude_q {
14342 __tmp.put_f32_le(*val);
14343 }
14344 for val in &self.rates {
14345 __tmp.put_f32_le(*val);
14346 }
14347 for val in &self.position_cov {
14348 __tmp.put_f32_le(*val);
14349 }
14350 __tmp.put_u8(self.est_capabilities);
14351 if matches!(version, MavlinkVersion::V2) {
14352 let len = __tmp.len();
14353 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14354 } else {
14355 __tmp.len()
14356 }
14357 }
14358}
14359#[doc = "Fuel status. This message provides \"generic\" fuel level information for in a GCS and for triggering failsafes in an autopilot. The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE. The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value. A recipient can assume that if these fields are supplied they are accurate. If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume). Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot). This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2. If both messages are sent for the same fuel system, the ids and corresponding information must match. This should be streamed (nominally at 0.1 Hz)."]
14360#[doc = ""]
14361#[doc = "ID: 371"]
14362#[derive(Debug, Clone, PartialEq)]
14363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14365#[cfg_attr(feature = "ts", derive(TS))]
14366#[cfg_attr(feature = "ts", ts(export))]
14367pub struct FUEL_STATUS_DATA {
14368 #[doc = "Capacity when full. Must be provided."]
14369 pub maximum_fuel: f32,
14370 #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
14371 pub consumed_fuel: f32,
14372 #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
14373 pub remaining_fuel: f32,
14374 #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
14375 pub flow_rate: f32,
14376 #[doc = "Fuel temperature. NaN: field not provided."]
14377 pub temperature: f32,
14378 #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
14379 pub fuel_type: MavFuelType,
14380 #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
14381 pub id: u8,
14382 #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
14383 pub percent_remaining: u8,
14384}
14385impl FUEL_STATUS_DATA {
14386 pub const ENCODED_LEN: usize = 26usize;
14387 pub const DEFAULT: Self = Self {
14388 maximum_fuel: 0.0_f32,
14389 consumed_fuel: 0.0_f32,
14390 remaining_fuel: 0.0_f32,
14391 flow_rate: 0.0_f32,
14392 temperature: 0.0_f32,
14393 fuel_type: MavFuelType::DEFAULT,
14394 id: 0_u8,
14395 percent_remaining: 0_u8,
14396 };
14397 #[cfg(feature = "arbitrary")]
14398 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14399 use arbitrary::{Arbitrary, Unstructured};
14400 let mut buf = [0u8; 1024];
14401 rng.fill_bytes(&mut buf);
14402 let mut unstructured = Unstructured::new(&buf);
14403 Self::arbitrary(&mut unstructured).unwrap_or_default()
14404 }
14405}
14406impl Default for FUEL_STATUS_DATA {
14407 fn default() -> Self {
14408 Self::DEFAULT.clone()
14409 }
14410}
14411impl MessageData for FUEL_STATUS_DATA {
14412 type Message = MavMessage;
14413 const ID: u32 = 371u32;
14414 const NAME: &'static str = "FUEL_STATUS";
14415 const EXTRA_CRC: u8 = 10u8;
14416 const ENCODED_LEN: usize = 26usize;
14417 fn deser(
14418 _version: MavlinkVersion,
14419 __input: &[u8],
14420 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14421 let avail_len = __input.len();
14422 let mut payload_buf = [0; Self::ENCODED_LEN];
14423 let mut buf = if avail_len < Self::ENCODED_LEN {
14424 payload_buf[0..avail_len].copy_from_slice(__input);
14425 Bytes::new(&payload_buf)
14426 } else {
14427 Bytes::new(__input)
14428 };
14429 let mut __struct = Self::default();
14430 __struct.maximum_fuel = buf.get_f32_le()?;
14431 __struct.consumed_fuel = buf.get_f32_le()?;
14432 __struct.remaining_fuel = buf.get_f32_le()?;
14433 __struct.flow_rate = buf.get_f32_le()?;
14434 __struct.temperature = buf.get_f32_le()?;
14435 let tmp = buf.get_u32_le()?;
14436 __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
14437 ::mavlink_core::error::ParserError::InvalidEnum {
14438 enum_type: "MavFuelType",
14439 value: tmp as u64,
14440 },
14441 )?;
14442 __struct.id = buf.get_u8()?;
14443 __struct.percent_remaining = buf.get_u8()?;
14444 Ok(__struct)
14445 }
14446 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14447 let mut __tmp = BytesMut::new(bytes);
14448 #[allow(clippy::absurd_extreme_comparisons)]
14449 #[allow(unused_comparisons)]
14450 if __tmp.remaining() < Self::ENCODED_LEN {
14451 panic!(
14452 "buffer is too small (need {} bytes, but got {})",
14453 Self::ENCODED_LEN,
14454 __tmp.remaining(),
14455 )
14456 }
14457 __tmp.put_f32_le(self.maximum_fuel);
14458 __tmp.put_f32_le(self.consumed_fuel);
14459 __tmp.put_f32_le(self.remaining_fuel);
14460 __tmp.put_f32_le(self.flow_rate);
14461 __tmp.put_f32_le(self.temperature);
14462 __tmp.put_u32_le(self.fuel_type as u32);
14463 __tmp.put_u8(self.id);
14464 __tmp.put_u8(self.percent_remaining);
14465 if matches!(version, MavlinkVersion::V2) {
14466 let len = __tmp.len();
14467 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14468 } else {
14469 __tmp.len()
14470 }
14471 }
14472}
14473#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
14474#[doc = ""]
14475#[doc = "ID: 373"]
14476#[derive(Debug, Clone, PartialEq)]
14477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14479#[cfg_attr(feature = "ts", derive(TS))]
14480#[cfg_attr(feature = "ts", ts(export))]
14481pub struct GENERATOR_STATUS_DATA {
14482 #[doc = "Status flags."]
14483 pub status: MavGeneratorStatusFlag,
14484 #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
14485 pub battery_current: f32,
14486 #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
14487 pub load_current: f32,
14488 #[doc = "The power being generated. NaN: field not provided"]
14489 pub power_generated: f32,
14490 #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
14491 pub bus_voltage: f32,
14492 #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
14493 pub bat_current_setpoint: f32,
14494 #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
14495 pub runtime: u32,
14496 #[doc = "Seconds until this generator requires maintenance. A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
14497 pub time_until_maintenance: i32,
14498 #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
14499 pub generator_speed: u16,
14500 #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
14501 pub rectifier_temperature: i16,
14502 #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
14503 pub generator_temperature: i16,
14504}
14505impl GENERATOR_STATUS_DATA {
14506 pub const ENCODED_LEN: usize = 42usize;
14507 pub const DEFAULT: Self = Self {
14508 status: MavGeneratorStatusFlag::DEFAULT,
14509 battery_current: 0.0_f32,
14510 load_current: 0.0_f32,
14511 power_generated: 0.0_f32,
14512 bus_voltage: 0.0_f32,
14513 bat_current_setpoint: 0.0_f32,
14514 runtime: 0_u32,
14515 time_until_maintenance: 0_i32,
14516 generator_speed: 0_u16,
14517 rectifier_temperature: 0_i16,
14518 generator_temperature: 0_i16,
14519 };
14520 #[cfg(feature = "arbitrary")]
14521 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14522 use arbitrary::{Arbitrary, Unstructured};
14523 let mut buf = [0u8; 1024];
14524 rng.fill_bytes(&mut buf);
14525 let mut unstructured = Unstructured::new(&buf);
14526 Self::arbitrary(&mut unstructured).unwrap_or_default()
14527 }
14528}
14529impl Default for GENERATOR_STATUS_DATA {
14530 fn default() -> Self {
14531 Self::DEFAULT.clone()
14532 }
14533}
14534impl MessageData for GENERATOR_STATUS_DATA {
14535 type Message = MavMessage;
14536 const ID: u32 = 373u32;
14537 const NAME: &'static str = "GENERATOR_STATUS";
14538 const EXTRA_CRC: u8 = 117u8;
14539 const ENCODED_LEN: usize = 42usize;
14540 fn deser(
14541 _version: MavlinkVersion,
14542 __input: &[u8],
14543 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14544 let avail_len = __input.len();
14545 let mut payload_buf = [0; Self::ENCODED_LEN];
14546 let mut buf = if avail_len < Self::ENCODED_LEN {
14547 payload_buf[0..avail_len].copy_from_slice(__input);
14548 Bytes::new(&payload_buf)
14549 } else {
14550 Bytes::new(__input)
14551 };
14552 let mut __struct = Self::default();
14553 let tmp = buf.get_u64_le()?;
14554 __struct.status =
14555 MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
14556 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14557 flag_type: "MavGeneratorStatusFlag",
14558 value: tmp as u64,
14559 })?;
14560 __struct.battery_current = buf.get_f32_le()?;
14561 __struct.load_current = buf.get_f32_le()?;
14562 __struct.power_generated = buf.get_f32_le()?;
14563 __struct.bus_voltage = buf.get_f32_le()?;
14564 __struct.bat_current_setpoint = buf.get_f32_le()?;
14565 __struct.runtime = buf.get_u32_le()?;
14566 __struct.time_until_maintenance = buf.get_i32_le()?;
14567 __struct.generator_speed = buf.get_u16_le()?;
14568 __struct.rectifier_temperature = buf.get_i16_le()?;
14569 __struct.generator_temperature = buf.get_i16_le()?;
14570 Ok(__struct)
14571 }
14572 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14573 let mut __tmp = BytesMut::new(bytes);
14574 #[allow(clippy::absurd_extreme_comparisons)]
14575 #[allow(unused_comparisons)]
14576 if __tmp.remaining() < Self::ENCODED_LEN {
14577 panic!(
14578 "buffer is too small (need {} bytes, but got {})",
14579 Self::ENCODED_LEN,
14580 __tmp.remaining(),
14581 )
14582 }
14583 __tmp.put_u64_le(self.status.bits() as u64);
14584 __tmp.put_f32_le(self.battery_current);
14585 __tmp.put_f32_le(self.load_current);
14586 __tmp.put_f32_le(self.power_generated);
14587 __tmp.put_f32_le(self.bus_voltage);
14588 __tmp.put_f32_le(self.bat_current_setpoint);
14589 __tmp.put_u32_le(self.runtime);
14590 __tmp.put_i32_le(self.time_until_maintenance);
14591 __tmp.put_u16_le(self.generator_speed);
14592 __tmp.put_i16_le(self.rectifier_temperature);
14593 __tmp.put_i16_le(self.generator_temperature);
14594 if matches!(version, MavlinkVersion::V2) {
14595 let len = __tmp.len();
14596 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14597 } else {
14598 __tmp.len()
14599 }
14600 }
14601}
14602#[doc = "Message reporting the status of a gimbal device. \t This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t For the angles encoded in the quaternion and the angular velocities holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t If neither of these flags are set, then (for backwards compatibility) it holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t else they are relative to the vehicle heading (vehicle frame). \t Other conditions of the flags are not allowed. \t The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
14603#[doc = ""]
14604#[doc = "ID: 285"]
14605#[derive(Debug, Clone, PartialEq)]
14606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14607#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14608#[cfg_attr(feature = "ts", derive(TS))]
14609#[cfg_attr(feature = "ts", ts(export))]
14610pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14611 #[doc = "Timestamp (time since system boot)."]
14612 pub time_boot_ms: u32,
14613 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
14614 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14615 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14616 pub q: [f32; 4],
14617 #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
14618 pub angular_velocity_x: f32,
14619 #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
14620 pub angular_velocity_y: f32,
14621 #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
14622 pub angular_velocity_z: f32,
14623 #[doc = "Failure flags (0 for no failure)"]
14624 pub failure_flags: GimbalDeviceErrorFlags,
14625 #[doc = "Current gimbal flags set."]
14626 pub flags: GimbalDeviceFlags,
14627 #[doc = "System ID"]
14628 pub target_system: u8,
14629 #[doc = "Component ID"]
14630 pub target_component: u8,
14631 #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
14632 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14633 pub delta_yaw: f32,
14634 #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
14635 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14636 pub delta_yaw_velocity: f32,
14637 #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
14638 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14639 pub gimbal_device_id: u8,
14640}
14641impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14642 pub const ENCODED_LEN: usize = 49usize;
14643 pub const DEFAULT: Self = Self {
14644 time_boot_ms: 0_u32,
14645 q: [0.0_f32; 4usize],
14646 angular_velocity_x: 0.0_f32,
14647 angular_velocity_y: 0.0_f32,
14648 angular_velocity_z: 0.0_f32,
14649 failure_flags: GimbalDeviceErrorFlags::DEFAULT,
14650 flags: GimbalDeviceFlags::DEFAULT,
14651 target_system: 0_u8,
14652 target_component: 0_u8,
14653 delta_yaw: 0.0_f32,
14654 delta_yaw_velocity: 0.0_f32,
14655 gimbal_device_id: 0_u8,
14656 };
14657 #[cfg(feature = "arbitrary")]
14658 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14659 use arbitrary::{Arbitrary, Unstructured};
14660 let mut buf = [0u8; 1024];
14661 rng.fill_bytes(&mut buf);
14662 let mut unstructured = Unstructured::new(&buf);
14663 Self::arbitrary(&mut unstructured).unwrap_or_default()
14664 }
14665}
14666impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14667 fn default() -> Self {
14668 Self::DEFAULT.clone()
14669 }
14670}
14671impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14672 type Message = MavMessage;
14673 const ID: u32 = 285u32;
14674 const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
14675 const EXTRA_CRC: u8 = 137u8;
14676 const ENCODED_LEN: usize = 49usize;
14677 fn deser(
14678 _version: MavlinkVersion,
14679 __input: &[u8],
14680 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14681 let avail_len = __input.len();
14682 let mut payload_buf = [0; Self::ENCODED_LEN];
14683 let mut buf = if avail_len < Self::ENCODED_LEN {
14684 payload_buf[0..avail_len].copy_from_slice(__input);
14685 Bytes::new(&payload_buf)
14686 } else {
14687 Bytes::new(__input)
14688 };
14689 let mut __struct = Self::default();
14690 __struct.time_boot_ms = buf.get_u32_le()?;
14691 for v in &mut __struct.q {
14692 let val = buf.get_f32_le()?;
14693 *v = val;
14694 }
14695 __struct.angular_velocity_x = buf.get_f32_le()?;
14696 __struct.angular_velocity_y = buf.get_f32_le()?;
14697 __struct.angular_velocity_z = buf.get_f32_le()?;
14698 let tmp = buf.get_u32_le()?;
14699 __struct.failure_flags =
14700 GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
14701 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14702 flag_type: "GimbalDeviceErrorFlags",
14703 value: tmp as u64,
14704 })?;
14705 let tmp = buf.get_u16_le()?;
14706 __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
14707 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14708 flag_type: "GimbalDeviceFlags",
14709 value: tmp as u64,
14710 })?;
14711 __struct.target_system = buf.get_u8()?;
14712 __struct.target_component = buf.get_u8()?;
14713 __struct.delta_yaw = buf.get_f32_le()?;
14714 __struct.delta_yaw_velocity = buf.get_f32_le()?;
14715 __struct.gimbal_device_id = buf.get_u8()?;
14716 Ok(__struct)
14717 }
14718 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14719 let mut __tmp = BytesMut::new(bytes);
14720 #[allow(clippy::absurd_extreme_comparisons)]
14721 #[allow(unused_comparisons)]
14722 if __tmp.remaining() < Self::ENCODED_LEN {
14723 panic!(
14724 "buffer is too small (need {} bytes, but got {})",
14725 Self::ENCODED_LEN,
14726 __tmp.remaining(),
14727 )
14728 }
14729 __tmp.put_u32_le(self.time_boot_ms);
14730 for val in &self.q {
14731 __tmp.put_f32_le(*val);
14732 }
14733 __tmp.put_f32_le(self.angular_velocity_x);
14734 __tmp.put_f32_le(self.angular_velocity_y);
14735 __tmp.put_f32_le(self.angular_velocity_z);
14736 __tmp.put_u32_le(self.failure_flags.bits() as u32);
14737 __tmp.put_u16_le(self.flags.bits() as u16);
14738 __tmp.put_u8(self.target_system);
14739 __tmp.put_u8(self.target_component);
14740 if matches!(version, MavlinkVersion::V2) {
14741 __tmp.put_f32_le(self.delta_yaw);
14742 __tmp.put_f32_le(self.delta_yaw_velocity);
14743 __tmp.put_u8(self.gimbal_device_id);
14744 let len = __tmp.len();
14745 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14746 } else {
14747 __tmp.len()
14748 }
14749 }
14750}
14751#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
14752#[doc = ""]
14753#[doc = "ID: 283"]
14754#[derive(Debug, Clone, PartialEq)]
14755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14756#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14757#[cfg_attr(feature = "ts", derive(TS))]
14758#[cfg_attr(feature = "ts", ts(export))]
14759pub struct GIMBAL_DEVICE_INFORMATION_DATA {
14760 #[doc = "UID of gimbal hardware (0 if unknown)."]
14761 pub uid: u64,
14762 #[doc = "Timestamp (time since system boot)."]
14763 pub time_boot_ms: u32,
14764 #[doc = "Version of the gimbal firmware, encoded as: `(Dev&0xff)<<24 + (Patch&0xff)<<16 + (Minor&0xff)<<8 + (Major&0xff)`."]
14765 pub firmware_version: u32,
14766 #[doc = "Version of the gimbal hardware, encoded as: `(Dev&0xff)<<24 + (Patch&0xff)<<16 + (Minor&0xff)<<8 + (Major&0xff)`."]
14767 pub hardware_version: u32,
14768 #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
14769 pub roll_min: f32,
14770 #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
14771 pub roll_max: f32,
14772 #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
14773 pub pitch_min: f32,
14774 #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
14775 pub pitch_max: f32,
14776 #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
14777 pub yaw_min: f32,
14778 #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
14779 pub yaw_max: f32,
14780 #[doc = "Bitmap of gimbal capability flags."]
14781 pub cap_flags: GimbalDeviceCapFlags,
14782 #[doc = "Bitmap for use for gimbal-specific capability flags."]
14783 pub custom_cap_flags: u16,
14784 #[doc = "Name of the gimbal vendor."]
14785 #[cfg_attr(feature = "ts", ts(type = "string"))]
14786 pub vendor_name: CharArray<32>,
14787 #[doc = "Name of the gimbal model."]
14788 #[cfg_attr(feature = "ts", ts(type = "string"))]
14789 pub model_name: CharArray<32>,
14790 #[doc = "Custom name of the gimbal given to it by the user."]
14791 #[cfg_attr(feature = "ts", ts(type = "string"))]
14792 pub custom_name: CharArray<32>,
14793 #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
14794 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14795 pub gimbal_device_id: u8,
14796}
14797impl GIMBAL_DEVICE_INFORMATION_DATA {
14798 pub const ENCODED_LEN: usize = 145usize;
14799 pub const DEFAULT: Self = Self {
14800 uid: 0_u64,
14801 time_boot_ms: 0_u32,
14802 firmware_version: 0_u32,
14803 hardware_version: 0_u32,
14804 roll_min: 0.0_f32,
14805 roll_max: 0.0_f32,
14806 pitch_min: 0.0_f32,
14807 pitch_max: 0.0_f32,
14808 yaw_min: 0.0_f32,
14809 yaw_max: 0.0_f32,
14810 cap_flags: GimbalDeviceCapFlags::DEFAULT,
14811 custom_cap_flags: 0_u16,
14812 vendor_name: CharArray::new([0_u8; 32usize]),
14813 model_name: CharArray::new([0_u8; 32usize]),
14814 custom_name: CharArray::new([0_u8; 32usize]),
14815 gimbal_device_id: 0_u8,
14816 };
14817 #[cfg(feature = "arbitrary")]
14818 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14819 use arbitrary::{Arbitrary, Unstructured};
14820 let mut buf = [0u8; 1024];
14821 rng.fill_bytes(&mut buf);
14822 let mut unstructured = Unstructured::new(&buf);
14823 Self::arbitrary(&mut unstructured).unwrap_or_default()
14824 }
14825}
14826impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
14827 fn default() -> Self {
14828 Self::DEFAULT.clone()
14829 }
14830}
14831impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
14832 type Message = MavMessage;
14833 const ID: u32 = 283u32;
14834 const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
14835 const EXTRA_CRC: u8 = 74u8;
14836 const ENCODED_LEN: usize = 145usize;
14837 fn deser(
14838 _version: MavlinkVersion,
14839 __input: &[u8],
14840 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14841 let avail_len = __input.len();
14842 let mut payload_buf = [0; Self::ENCODED_LEN];
14843 let mut buf = if avail_len < Self::ENCODED_LEN {
14844 payload_buf[0..avail_len].copy_from_slice(__input);
14845 Bytes::new(&payload_buf)
14846 } else {
14847 Bytes::new(__input)
14848 };
14849 let mut __struct = Self::default();
14850 __struct.uid = buf.get_u64_le()?;
14851 __struct.time_boot_ms = buf.get_u32_le()?;
14852 __struct.firmware_version = buf.get_u32_le()?;
14853 __struct.hardware_version = buf.get_u32_le()?;
14854 __struct.roll_min = buf.get_f32_le()?;
14855 __struct.roll_max = buf.get_f32_le()?;
14856 __struct.pitch_min = buf.get_f32_le()?;
14857 __struct.pitch_max = buf.get_f32_le()?;
14858 __struct.yaw_min = buf.get_f32_le()?;
14859 __struct.yaw_max = buf.get_f32_le()?;
14860 let tmp = buf.get_u16_le()?;
14861 __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
14862 tmp as <GimbalDeviceCapFlags as Flags>::Bits,
14863 )
14864 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14865 flag_type: "GimbalDeviceCapFlags",
14866 value: tmp as u64,
14867 })?;
14868 __struct.custom_cap_flags = buf.get_u16_le()?;
14869 let mut tmp = [0_u8; 32usize];
14870 for v in &mut tmp {
14871 *v = buf.get_u8()?;
14872 }
14873 __struct.vendor_name = CharArray::new(tmp);
14874 let mut tmp = [0_u8; 32usize];
14875 for v in &mut tmp {
14876 *v = buf.get_u8()?;
14877 }
14878 __struct.model_name = CharArray::new(tmp);
14879 let mut tmp = [0_u8; 32usize];
14880 for v in &mut tmp {
14881 *v = buf.get_u8()?;
14882 }
14883 __struct.custom_name = CharArray::new(tmp);
14884 __struct.gimbal_device_id = buf.get_u8()?;
14885 Ok(__struct)
14886 }
14887 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14888 let mut __tmp = BytesMut::new(bytes);
14889 #[allow(clippy::absurd_extreme_comparisons)]
14890 #[allow(unused_comparisons)]
14891 if __tmp.remaining() < Self::ENCODED_LEN {
14892 panic!(
14893 "buffer is too small (need {} bytes, but got {})",
14894 Self::ENCODED_LEN,
14895 __tmp.remaining(),
14896 )
14897 }
14898 __tmp.put_u64_le(self.uid);
14899 __tmp.put_u32_le(self.time_boot_ms);
14900 __tmp.put_u32_le(self.firmware_version);
14901 __tmp.put_u32_le(self.hardware_version);
14902 __tmp.put_f32_le(self.roll_min);
14903 __tmp.put_f32_le(self.roll_max);
14904 __tmp.put_f32_le(self.pitch_min);
14905 __tmp.put_f32_le(self.pitch_max);
14906 __tmp.put_f32_le(self.yaw_min);
14907 __tmp.put_f32_le(self.yaw_max);
14908 __tmp.put_u16_le(self.cap_flags.bits() as u16);
14909 __tmp.put_u16_le(self.custom_cap_flags);
14910 for val in &self.vendor_name {
14911 __tmp.put_u8(*val);
14912 }
14913 for val in &self.model_name {
14914 __tmp.put_u8(*val);
14915 }
14916 for val in &self.custom_name {
14917 __tmp.put_u8(*val);
14918 }
14919 if matches!(version, MavlinkVersion::V2) {
14920 __tmp.put_u8(self.gimbal_device_id);
14921 let len = __tmp.len();
14922 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14923 } else {
14924 __tmp.len()
14925 }
14926 }
14927}
14928#[doc = "Low level message to control a gimbal device's attitude. \t This message is to be sent from the gimbal manager to the gimbal device component. \t The quaternion and angular velocities can be set to NaN according to use case. \t For the angles encoded in the quaternion and the angular velocities holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t If neither of these flags are set, then (for backwards compatibility) it holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t else they are relative to the vehicle heading (vehicle frame). \t Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t These rules are to ensure backwards compatibility. \t New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
14929#[doc = ""]
14930#[doc = "ID: 284"]
14931#[derive(Debug, Clone, PartialEq)]
14932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14934#[cfg_attr(feature = "ts", derive(TS))]
14935#[cfg_attr(feature = "ts", ts(export))]
14936pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
14937 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
14938 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14939 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14940 pub q: [f32; 4],
14941 #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
14942 pub angular_velocity_x: f32,
14943 #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
14944 pub angular_velocity_y: f32,
14945 #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
14946 pub angular_velocity_z: f32,
14947 #[doc = "Low level gimbal flags."]
14948 pub flags: GimbalDeviceFlags,
14949 #[doc = "System ID"]
14950 pub target_system: u8,
14951 #[doc = "Component ID"]
14952 pub target_component: u8,
14953}
14954impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
14955 pub const ENCODED_LEN: usize = 32usize;
14956 pub const DEFAULT: Self = Self {
14957 q: [0.0_f32; 4usize],
14958 angular_velocity_x: 0.0_f32,
14959 angular_velocity_y: 0.0_f32,
14960 angular_velocity_z: 0.0_f32,
14961 flags: GimbalDeviceFlags::DEFAULT,
14962 target_system: 0_u8,
14963 target_component: 0_u8,
14964 };
14965 #[cfg(feature = "arbitrary")]
14966 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14967 use arbitrary::{Arbitrary, Unstructured};
14968 let mut buf = [0u8; 1024];
14969 rng.fill_bytes(&mut buf);
14970 let mut unstructured = Unstructured::new(&buf);
14971 Self::arbitrary(&mut unstructured).unwrap_or_default()
14972 }
14973}
14974impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
14975 fn default() -> Self {
14976 Self::DEFAULT.clone()
14977 }
14978}
14979impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
14980 type Message = MavMessage;
14981 const ID: u32 = 284u32;
14982 const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
14983 const EXTRA_CRC: u8 = 99u8;
14984 const ENCODED_LEN: usize = 32usize;
14985 fn deser(
14986 _version: MavlinkVersion,
14987 __input: &[u8],
14988 ) -> Result<Self, ::mavlink_core::error::ParserError> {
14989 let avail_len = __input.len();
14990 let mut payload_buf = [0; Self::ENCODED_LEN];
14991 let mut buf = if avail_len < Self::ENCODED_LEN {
14992 payload_buf[0..avail_len].copy_from_slice(__input);
14993 Bytes::new(&payload_buf)
14994 } else {
14995 Bytes::new(__input)
14996 };
14997 let mut __struct = Self::default();
14998 for v in &mut __struct.q {
14999 let val = buf.get_f32_le()?;
15000 *v = val;
15001 }
15002 __struct.angular_velocity_x = buf.get_f32_le()?;
15003 __struct.angular_velocity_y = buf.get_f32_le()?;
15004 __struct.angular_velocity_z = buf.get_f32_le()?;
15005 let tmp = buf.get_u16_le()?;
15006 __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
15007 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15008 flag_type: "GimbalDeviceFlags",
15009 value: tmp as u64,
15010 })?;
15011 __struct.target_system = buf.get_u8()?;
15012 __struct.target_component = buf.get_u8()?;
15013 Ok(__struct)
15014 }
15015 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15016 let mut __tmp = BytesMut::new(bytes);
15017 #[allow(clippy::absurd_extreme_comparisons)]
15018 #[allow(unused_comparisons)]
15019 if __tmp.remaining() < Self::ENCODED_LEN {
15020 panic!(
15021 "buffer is too small (need {} bytes, but got {})",
15022 Self::ENCODED_LEN,
15023 __tmp.remaining(),
15024 )
15025 }
15026 for val in &self.q {
15027 __tmp.put_f32_le(*val);
15028 }
15029 __tmp.put_f32_le(self.angular_velocity_x);
15030 __tmp.put_f32_le(self.angular_velocity_y);
15031 __tmp.put_f32_le(self.angular_velocity_z);
15032 __tmp.put_u16_le(self.flags.bits() as u16);
15033 __tmp.put_u8(self.target_system);
15034 __tmp.put_u8(self.target_component);
15035 if matches!(version, MavlinkVersion::V2) {
15036 let len = __tmp.len();
15037 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15038 } else {
15039 __tmp.len()
15040 }
15041 }
15042}
15043#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
15044#[doc = ""]
15045#[doc = "ID: 280"]
15046#[derive(Debug, Clone, PartialEq)]
15047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15049#[cfg_attr(feature = "ts", derive(TS))]
15050#[cfg_attr(feature = "ts", ts(export))]
15051pub struct GIMBAL_MANAGER_INFORMATION_DATA {
15052 #[doc = "Timestamp (time since system boot)."]
15053 pub time_boot_ms: u32,
15054 #[doc = "Bitmap of gimbal capability flags."]
15055 pub cap_flags: GimbalManagerCapFlags,
15056 #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
15057 pub roll_min: f32,
15058 #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
15059 pub roll_max: f32,
15060 #[doc = "Minimum pitch angle (positive: up, negative: down)"]
15061 pub pitch_min: f32,
15062 #[doc = "Maximum pitch angle (positive: up, negative: down)"]
15063 pub pitch_max: f32,
15064 #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
15065 pub yaw_min: f32,
15066 #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
15067 pub yaw_max: f32,
15068 #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
15069 pub gimbal_device_id: u8,
15070}
15071impl GIMBAL_MANAGER_INFORMATION_DATA {
15072 pub const ENCODED_LEN: usize = 33usize;
15073 pub const DEFAULT: Self = Self {
15074 time_boot_ms: 0_u32,
15075 cap_flags: GimbalManagerCapFlags::DEFAULT,
15076 roll_min: 0.0_f32,
15077 roll_max: 0.0_f32,
15078 pitch_min: 0.0_f32,
15079 pitch_max: 0.0_f32,
15080 yaw_min: 0.0_f32,
15081 yaw_max: 0.0_f32,
15082 gimbal_device_id: 0_u8,
15083 };
15084 #[cfg(feature = "arbitrary")]
15085 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15086 use arbitrary::{Arbitrary, Unstructured};
15087 let mut buf = [0u8; 1024];
15088 rng.fill_bytes(&mut buf);
15089 let mut unstructured = Unstructured::new(&buf);
15090 Self::arbitrary(&mut unstructured).unwrap_or_default()
15091 }
15092}
15093impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
15094 fn default() -> Self {
15095 Self::DEFAULT.clone()
15096 }
15097}
15098impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
15099 type Message = MavMessage;
15100 const ID: u32 = 280u32;
15101 const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
15102 const EXTRA_CRC: u8 = 70u8;
15103 const ENCODED_LEN: usize = 33usize;
15104 fn deser(
15105 _version: MavlinkVersion,
15106 __input: &[u8],
15107 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15108 let avail_len = __input.len();
15109 let mut payload_buf = [0; Self::ENCODED_LEN];
15110 let mut buf = if avail_len < Self::ENCODED_LEN {
15111 payload_buf[0..avail_len].copy_from_slice(__input);
15112 Bytes::new(&payload_buf)
15113 } else {
15114 Bytes::new(__input)
15115 };
15116 let mut __struct = Self::default();
15117 __struct.time_boot_ms = buf.get_u32_le()?;
15118 let tmp = buf.get_u32_le()?;
15119 __struct.cap_flags = GimbalManagerCapFlags::from_bits(
15120 tmp as <GimbalManagerCapFlags as Flags>::Bits,
15121 )
15122 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15123 flag_type: "GimbalManagerCapFlags",
15124 value: tmp as u64,
15125 })?;
15126 __struct.roll_min = buf.get_f32_le()?;
15127 __struct.roll_max = buf.get_f32_le()?;
15128 __struct.pitch_min = buf.get_f32_le()?;
15129 __struct.pitch_max = buf.get_f32_le()?;
15130 __struct.yaw_min = buf.get_f32_le()?;
15131 __struct.yaw_max = buf.get_f32_le()?;
15132 __struct.gimbal_device_id = buf.get_u8()?;
15133 Ok(__struct)
15134 }
15135 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15136 let mut __tmp = BytesMut::new(bytes);
15137 #[allow(clippy::absurd_extreme_comparisons)]
15138 #[allow(unused_comparisons)]
15139 if __tmp.remaining() < Self::ENCODED_LEN {
15140 panic!(
15141 "buffer is too small (need {} bytes, but got {})",
15142 Self::ENCODED_LEN,
15143 __tmp.remaining(),
15144 )
15145 }
15146 __tmp.put_u32_le(self.time_boot_ms);
15147 __tmp.put_u32_le(self.cap_flags.bits() as u32);
15148 __tmp.put_f32_le(self.roll_min);
15149 __tmp.put_f32_le(self.roll_max);
15150 __tmp.put_f32_le(self.pitch_min);
15151 __tmp.put_f32_le(self.pitch_max);
15152 __tmp.put_f32_le(self.yaw_min);
15153 __tmp.put_f32_le(self.yaw_max);
15154 __tmp.put_u8(self.gimbal_device_id);
15155 if matches!(version, MavlinkVersion::V2) {
15156 let len = __tmp.len();
15157 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15158 } else {
15159 __tmp.len()
15160 }
15161 }
15162}
15163#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
15164#[doc = ""]
15165#[doc = "ID: 282"]
15166#[derive(Debug, Clone, PartialEq)]
15167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15169#[cfg_attr(feature = "ts", derive(TS))]
15170#[cfg_attr(feature = "ts", ts(export))]
15171pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
15172 #[doc = "High level gimbal manager flags to use."]
15173 pub flags: GimbalManagerFlags,
15174 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
15175 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15176 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15177 pub q: [f32; 4],
15178 #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
15179 pub angular_velocity_x: f32,
15180 #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
15181 pub angular_velocity_y: f32,
15182 #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
15183 pub angular_velocity_z: f32,
15184 #[doc = "System ID"]
15185 pub target_system: u8,
15186 #[doc = "Component ID"]
15187 pub target_component: u8,
15188 #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
15189 pub gimbal_device_id: u8,
15190}
15191impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
15192 pub const ENCODED_LEN: usize = 35usize;
15193 pub const DEFAULT: Self = Self {
15194 flags: GimbalManagerFlags::DEFAULT,
15195 q: [0.0_f32; 4usize],
15196 angular_velocity_x: 0.0_f32,
15197 angular_velocity_y: 0.0_f32,
15198 angular_velocity_z: 0.0_f32,
15199 target_system: 0_u8,
15200 target_component: 0_u8,
15201 gimbal_device_id: 0_u8,
15202 };
15203 #[cfg(feature = "arbitrary")]
15204 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15205 use arbitrary::{Arbitrary, Unstructured};
15206 let mut buf = [0u8; 1024];
15207 rng.fill_bytes(&mut buf);
15208 let mut unstructured = Unstructured::new(&buf);
15209 Self::arbitrary(&mut unstructured).unwrap_or_default()
15210 }
15211}
15212impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
15213 fn default() -> Self {
15214 Self::DEFAULT.clone()
15215 }
15216}
15217impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
15218 type Message = MavMessage;
15219 const ID: u32 = 282u32;
15220 const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
15221 const EXTRA_CRC: u8 = 123u8;
15222 const ENCODED_LEN: usize = 35usize;
15223 fn deser(
15224 _version: MavlinkVersion,
15225 __input: &[u8],
15226 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15227 let avail_len = __input.len();
15228 let mut payload_buf = [0; Self::ENCODED_LEN];
15229 let mut buf = if avail_len < Self::ENCODED_LEN {
15230 payload_buf[0..avail_len].copy_from_slice(__input);
15231 Bytes::new(&payload_buf)
15232 } else {
15233 Bytes::new(__input)
15234 };
15235 let mut __struct = Self::default();
15236 let tmp = buf.get_u32_le()?;
15237 __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15238 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15239 flag_type: "GimbalManagerFlags",
15240 value: tmp as u64,
15241 })?;
15242 for v in &mut __struct.q {
15243 let val = buf.get_f32_le()?;
15244 *v = val;
15245 }
15246 __struct.angular_velocity_x = buf.get_f32_le()?;
15247 __struct.angular_velocity_y = buf.get_f32_le()?;
15248 __struct.angular_velocity_z = buf.get_f32_le()?;
15249 __struct.target_system = buf.get_u8()?;
15250 __struct.target_component = buf.get_u8()?;
15251 __struct.gimbal_device_id = buf.get_u8()?;
15252 Ok(__struct)
15253 }
15254 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15255 let mut __tmp = BytesMut::new(bytes);
15256 #[allow(clippy::absurd_extreme_comparisons)]
15257 #[allow(unused_comparisons)]
15258 if __tmp.remaining() < Self::ENCODED_LEN {
15259 panic!(
15260 "buffer is too small (need {} bytes, but got {})",
15261 Self::ENCODED_LEN,
15262 __tmp.remaining(),
15263 )
15264 }
15265 __tmp.put_u32_le(self.flags.bits() as u32);
15266 for val in &self.q {
15267 __tmp.put_f32_le(*val);
15268 }
15269 __tmp.put_f32_le(self.angular_velocity_x);
15270 __tmp.put_f32_le(self.angular_velocity_y);
15271 __tmp.put_f32_le(self.angular_velocity_z);
15272 __tmp.put_u8(self.target_system);
15273 __tmp.put_u8(self.target_component);
15274 __tmp.put_u8(self.gimbal_device_id);
15275 if matches!(version, MavlinkVersion::V2) {
15276 let len = __tmp.len();
15277 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15278 } else {
15279 __tmp.len()
15280 }
15281 }
15282}
15283#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
15284#[doc = ""]
15285#[doc = "ID: 288"]
15286#[derive(Debug, Clone, PartialEq)]
15287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15289#[cfg_attr(feature = "ts", derive(TS))]
15290#[cfg_attr(feature = "ts", ts(export))]
15291pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15292 #[doc = "High level gimbal manager flags."]
15293 pub flags: GimbalManagerFlags,
15294 #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
15295 pub pitch: f32,
15296 #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
15297 pub yaw: f32,
15298 #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
15299 pub pitch_rate: f32,
15300 #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
15301 pub yaw_rate: f32,
15302 #[doc = "System ID"]
15303 pub target_system: u8,
15304 #[doc = "Component ID"]
15305 pub target_component: u8,
15306 #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
15307 pub gimbal_device_id: u8,
15308}
15309impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15310 pub const ENCODED_LEN: usize = 23usize;
15311 pub const DEFAULT: Self = Self {
15312 flags: GimbalManagerFlags::DEFAULT,
15313 pitch: 0.0_f32,
15314 yaw: 0.0_f32,
15315 pitch_rate: 0.0_f32,
15316 yaw_rate: 0.0_f32,
15317 target_system: 0_u8,
15318 target_component: 0_u8,
15319 gimbal_device_id: 0_u8,
15320 };
15321 #[cfg(feature = "arbitrary")]
15322 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15323 use arbitrary::{Arbitrary, Unstructured};
15324 let mut buf = [0u8; 1024];
15325 rng.fill_bytes(&mut buf);
15326 let mut unstructured = Unstructured::new(&buf);
15327 Self::arbitrary(&mut unstructured).unwrap_or_default()
15328 }
15329}
15330impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15331 fn default() -> Self {
15332 Self::DEFAULT.clone()
15333 }
15334}
15335impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15336 type Message = MavMessage;
15337 const ID: u32 = 288u32;
15338 const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
15339 const EXTRA_CRC: u8 = 20u8;
15340 const ENCODED_LEN: usize = 23usize;
15341 fn deser(
15342 _version: MavlinkVersion,
15343 __input: &[u8],
15344 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15345 let avail_len = __input.len();
15346 let mut payload_buf = [0; Self::ENCODED_LEN];
15347 let mut buf = if avail_len < Self::ENCODED_LEN {
15348 payload_buf[0..avail_len].copy_from_slice(__input);
15349 Bytes::new(&payload_buf)
15350 } else {
15351 Bytes::new(__input)
15352 };
15353 let mut __struct = Self::default();
15354 let tmp = buf.get_u32_le()?;
15355 __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15356 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15357 flag_type: "GimbalManagerFlags",
15358 value: tmp as u64,
15359 })?;
15360 __struct.pitch = buf.get_f32_le()?;
15361 __struct.yaw = buf.get_f32_le()?;
15362 __struct.pitch_rate = buf.get_f32_le()?;
15363 __struct.yaw_rate = buf.get_f32_le()?;
15364 __struct.target_system = buf.get_u8()?;
15365 __struct.target_component = buf.get_u8()?;
15366 __struct.gimbal_device_id = buf.get_u8()?;
15367 Ok(__struct)
15368 }
15369 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15370 let mut __tmp = BytesMut::new(bytes);
15371 #[allow(clippy::absurd_extreme_comparisons)]
15372 #[allow(unused_comparisons)]
15373 if __tmp.remaining() < Self::ENCODED_LEN {
15374 panic!(
15375 "buffer is too small (need {} bytes, but got {})",
15376 Self::ENCODED_LEN,
15377 __tmp.remaining(),
15378 )
15379 }
15380 __tmp.put_u32_le(self.flags.bits() as u32);
15381 __tmp.put_f32_le(self.pitch);
15382 __tmp.put_f32_le(self.yaw);
15383 __tmp.put_f32_le(self.pitch_rate);
15384 __tmp.put_f32_le(self.yaw_rate);
15385 __tmp.put_u8(self.target_system);
15386 __tmp.put_u8(self.target_component);
15387 __tmp.put_u8(self.gimbal_device_id);
15388 if matches!(version, MavlinkVersion::V2) {
15389 let len = __tmp.len();
15390 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15391 } else {
15392 __tmp.len()
15393 }
15394 }
15395}
15396#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
15397#[doc = ""]
15398#[doc = "ID: 287"]
15399#[derive(Debug, Clone, PartialEq)]
15400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15402#[cfg_attr(feature = "ts", derive(TS))]
15403#[cfg_attr(feature = "ts", ts(export))]
15404pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15405 #[doc = "High level gimbal manager flags to use."]
15406 pub flags: GimbalManagerFlags,
15407 #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
15408 pub pitch: f32,
15409 #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
15410 pub yaw: f32,
15411 #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
15412 pub pitch_rate: f32,
15413 #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
15414 pub yaw_rate: f32,
15415 #[doc = "System ID"]
15416 pub target_system: u8,
15417 #[doc = "Component ID"]
15418 pub target_component: u8,
15419 #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
15420 pub gimbal_device_id: u8,
15421}
15422impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15423 pub const ENCODED_LEN: usize = 23usize;
15424 pub const DEFAULT: Self = Self {
15425 flags: GimbalManagerFlags::DEFAULT,
15426 pitch: 0.0_f32,
15427 yaw: 0.0_f32,
15428 pitch_rate: 0.0_f32,
15429 yaw_rate: 0.0_f32,
15430 target_system: 0_u8,
15431 target_component: 0_u8,
15432 gimbal_device_id: 0_u8,
15433 };
15434 #[cfg(feature = "arbitrary")]
15435 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15436 use arbitrary::{Arbitrary, Unstructured};
15437 let mut buf = [0u8; 1024];
15438 rng.fill_bytes(&mut buf);
15439 let mut unstructured = Unstructured::new(&buf);
15440 Self::arbitrary(&mut unstructured).unwrap_or_default()
15441 }
15442}
15443impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15444 fn default() -> Self {
15445 Self::DEFAULT.clone()
15446 }
15447}
15448impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15449 type Message = MavMessage;
15450 const ID: u32 = 287u32;
15451 const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
15452 const EXTRA_CRC: u8 = 1u8;
15453 const ENCODED_LEN: usize = 23usize;
15454 fn deser(
15455 _version: MavlinkVersion,
15456 __input: &[u8],
15457 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15458 let avail_len = __input.len();
15459 let mut payload_buf = [0; Self::ENCODED_LEN];
15460 let mut buf = if avail_len < Self::ENCODED_LEN {
15461 payload_buf[0..avail_len].copy_from_slice(__input);
15462 Bytes::new(&payload_buf)
15463 } else {
15464 Bytes::new(__input)
15465 };
15466 let mut __struct = Self::default();
15467 let tmp = buf.get_u32_le()?;
15468 __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15469 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15470 flag_type: "GimbalManagerFlags",
15471 value: tmp as u64,
15472 })?;
15473 __struct.pitch = buf.get_f32_le()?;
15474 __struct.yaw = buf.get_f32_le()?;
15475 __struct.pitch_rate = buf.get_f32_le()?;
15476 __struct.yaw_rate = buf.get_f32_le()?;
15477 __struct.target_system = buf.get_u8()?;
15478 __struct.target_component = buf.get_u8()?;
15479 __struct.gimbal_device_id = buf.get_u8()?;
15480 Ok(__struct)
15481 }
15482 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15483 let mut __tmp = BytesMut::new(bytes);
15484 #[allow(clippy::absurd_extreme_comparisons)]
15485 #[allow(unused_comparisons)]
15486 if __tmp.remaining() < Self::ENCODED_LEN {
15487 panic!(
15488 "buffer is too small (need {} bytes, but got {})",
15489 Self::ENCODED_LEN,
15490 __tmp.remaining(),
15491 )
15492 }
15493 __tmp.put_u32_le(self.flags.bits() as u32);
15494 __tmp.put_f32_le(self.pitch);
15495 __tmp.put_f32_le(self.yaw);
15496 __tmp.put_f32_le(self.pitch_rate);
15497 __tmp.put_f32_le(self.yaw_rate);
15498 __tmp.put_u8(self.target_system);
15499 __tmp.put_u8(self.target_component);
15500 __tmp.put_u8(self.gimbal_device_id);
15501 if matches!(version, MavlinkVersion::V2) {
15502 let len = __tmp.len();
15503 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15504 } else {
15505 __tmp.len()
15506 }
15507 }
15508}
15509#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
15510#[doc = ""]
15511#[doc = "ID: 281"]
15512#[derive(Debug, Clone, PartialEq)]
15513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15515#[cfg_attr(feature = "ts", derive(TS))]
15516#[cfg_attr(feature = "ts", ts(export))]
15517pub struct GIMBAL_MANAGER_STATUS_DATA {
15518 #[doc = "Timestamp (time since system boot)."]
15519 pub time_boot_ms: u32,
15520 #[doc = "High level gimbal manager flags currently applied."]
15521 pub flags: GimbalManagerFlags,
15522 #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
15523 pub gimbal_device_id: u8,
15524 #[doc = "System ID of MAVLink component with primary control, 0 for none."]
15525 pub primary_control_sysid: u8,
15526 #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
15527 pub primary_control_compid: u8,
15528 #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
15529 pub secondary_control_sysid: u8,
15530 #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
15531 pub secondary_control_compid: u8,
15532}
15533impl GIMBAL_MANAGER_STATUS_DATA {
15534 pub const ENCODED_LEN: usize = 13usize;
15535 pub const DEFAULT: Self = Self {
15536 time_boot_ms: 0_u32,
15537 flags: GimbalManagerFlags::DEFAULT,
15538 gimbal_device_id: 0_u8,
15539 primary_control_sysid: 0_u8,
15540 primary_control_compid: 0_u8,
15541 secondary_control_sysid: 0_u8,
15542 secondary_control_compid: 0_u8,
15543 };
15544 #[cfg(feature = "arbitrary")]
15545 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15546 use arbitrary::{Arbitrary, Unstructured};
15547 let mut buf = [0u8; 1024];
15548 rng.fill_bytes(&mut buf);
15549 let mut unstructured = Unstructured::new(&buf);
15550 Self::arbitrary(&mut unstructured).unwrap_or_default()
15551 }
15552}
15553impl Default for GIMBAL_MANAGER_STATUS_DATA {
15554 fn default() -> Self {
15555 Self::DEFAULT.clone()
15556 }
15557}
15558impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
15559 type Message = MavMessage;
15560 const ID: u32 = 281u32;
15561 const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
15562 const EXTRA_CRC: u8 = 48u8;
15563 const ENCODED_LEN: usize = 13usize;
15564 fn deser(
15565 _version: MavlinkVersion,
15566 __input: &[u8],
15567 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15568 let avail_len = __input.len();
15569 let mut payload_buf = [0; Self::ENCODED_LEN];
15570 let mut buf = if avail_len < Self::ENCODED_LEN {
15571 payload_buf[0..avail_len].copy_from_slice(__input);
15572 Bytes::new(&payload_buf)
15573 } else {
15574 Bytes::new(__input)
15575 };
15576 let mut __struct = Self::default();
15577 __struct.time_boot_ms = buf.get_u32_le()?;
15578 let tmp = buf.get_u32_le()?;
15579 __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15580 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15581 flag_type: "GimbalManagerFlags",
15582 value: tmp as u64,
15583 })?;
15584 __struct.gimbal_device_id = buf.get_u8()?;
15585 __struct.primary_control_sysid = buf.get_u8()?;
15586 __struct.primary_control_compid = buf.get_u8()?;
15587 __struct.secondary_control_sysid = buf.get_u8()?;
15588 __struct.secondary_control_compid = buf.get_u8()?;
15589 Ok(__struct)
15590 }
15591 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15592 let mut __tmp = BytesMut::new(bytes);
15593 #[allow(clippy::absurd_extreme_comparisons)]
15594 #[allow(unused_comparisons)]
15595 if __tmp.remaining() < Self::ENCODED_LEN {
15596 panic!(
15597 "buffer is too small (need {} bytes, but got {})",
15598 Self::ENCODED_LEN,
15599 __tmp.remaining(),
15600 )
15601 }
15602 __tmp.put_u32_le(self.time_boot_ms);
15603 __tmp.put_u32_le(self.flags.bits() as u32);
15604 __tmp.put_u8(self.gimbal_device_id);
15605 __tmp.put_u8(self.primary_control_sysid);
15606 __tmp.put_u8(self.primary_control_compid);
15607 __tmp.put_u8(self.secondary_control_sysid);
15608 __tmp.put_u8(self.secondary_control_compid);
15609 if matches!(version, MavlinkVersion::V2) {
15610 let len = __tmp.len();
15611 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15612 } else {
15613 __tmp.len()
15614 }
15615 }
15616}
15617#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient."]
15618#[doc = ""]
15619#[doc = "ID: 33"]
15620#[derive(Debug, Clone, PartialEq)]
15621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15623#[cfg_attr(feature = "ts", derive(TS))]
15624#[cfg_attr(feature = "ts", ts(export))]
15625pub struct GLOBAL_POSITION_INT_DATA {
15626 #[doc = "Timestamp (time since system boot)."]
15627 pub time_boot_ms: u32,
15628 #[doc = "Latitude, expressed"]
15629 pub lat: i32,
15630 #[doc = "Longitude, expressed"]
15631 pub lon: i32,
15632 #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
15633 pub alt: i32,
15634 #[doc = "Altitude above home"]
15635 pub relative_alt: i32,
15636 #[doc = "Ground X Speed (Latitude, positive north)"]
15637 pub vx: i16,
15638 #[doc = "Ground Y Speed (Longitude, positive east)"]
15639 pub vy: i16,
15640 #[doc = "Ground Z Speed (Altitude, positive down)"]
15641 pub vz: i16,
15642 #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15643 pub hdg: u16,
15644}
15645impl GLOBAL_POSITION_INT_DATA {
15646 pub const ENCODED_LEN: usize = 28usize;
15647 pub const DEFAULT: Self = Self {
15648 time_boot_ms: 0_u32,
15649 lat: 0_i32,
15650 lon: 0_i32,
15651 alt: 0_i32,
15652 relative_alt: 0_i32,
15653 vx: 0_i16,
15654 vy: 0_i16,
15655 vz: 0_i16,
15656 hdg: 0_u16,
15657 };
15658 #[cfg(feature = "arbitrary")]
15659 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15660 use arbitrary::{Arbitrary, Unstructured};
15661 let mut buf = [0u8; 1024];
15662 rng.fill_bytes(&mut buf);
15663 let mut unstructured = Unstructured::new(&buf);
15664 Self::arbitrary(&mut unstructured).unwrap_or_default()
15665 }
15666}
15667impl Default for GLOBAL_POSITION_INT_DATA {
15668 fn default() -> Self {
15669 Self::DEFAULT.clone()
15670 }
15671}
15672impl MessageData for GLOBAL_POSITION_INT_DATA {
15673 type Message = MavMessage;
15674 const ID: u32 = 33u32;
15675 const NAME: &'static str = "GLOBAL_POSITION_INT";
15676 const EXTRA_CRC: u8 = 104u8;
15677 const ENCODED_LEN: usize = 28usize;
15678 fn deser(
15679 _version: MavlinkVersion,
15680 __input: &[u8],
15681 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15682 let avail_len = __input.len();
15683 let mut payload_buf = [0; Self::ENCODED_LEN];
15684 let mut buf = if avail_len < Self::ENCODED_LEN {
15685 payload_buf[0..avail_len].copy_from_slice(__input);
15686 Bytes::new(&payload_buf)
15687 } else {
15688 Bytes::new(__input)
15689 };
15690 let mut __struct = Self::default();
15691 __struct.time_boot_ms = buf.get_u32_le()?;
15692 __struct.lat = buf.get_i32_le()?;
15693 __struct.lon = buf.get_i32_le()?;
15694 __struct.alt = buf.get_i32_le()?;
15695 __struct.relative_alt = buf.get_i32_le()?;
15696 __struct.vx = buf.get_i16_le()?;
15697 __struct.vy = buf.get_i16_le()?;
15698 __struct.vz = buf.get_i16_le()?;
15699 __struct.hdg = buf.get_u16_le()?;
15700 Ok(__struct)
15701 }
15702 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15703 let mut __tmp = BytesMut::new(bytes);
15704 #[allow(clippy::absurd_extreme_comparisons)]
15705 #[allow(unused_comparisons)]
15706 if __tmp.remaining() < Self::ENCODED_LEN {
15707 panic!(
15708 "buffer is too small (need {} bytes, but got {})",
15709 Self::ENCODED_LEN,
15710 __tmp.remaining(),
15711 )
15712 }
15713 __tmp.put_u32_le(self.time_boot_ms);
15714 __tmp.put_i32_le(self.lat);
15715 __tmp.put_i32_le(self.lon);
15716 __tmp.put_i32_le(self.alt);
15717 __tmp.put_i32_le(self.relative_alt);
15718 __tmp.put_i16_le(self.vx);
15719 __tmp.put_i16_le(self.vy);
15720 __tmp.put_i16_le(self.vz);
15721 __tmp.put_u16_le(self.hdg);
15722 if matches!(version, MavlinkVersion::V2) {
15723 let len = __tmp.len();
15724 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15725 } else {
15726 __tmp.len()
15727 }
15728 }
15729}
15730#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
15731#[doc = ""]
15732#[doc = "ID: 63"]
15733#[derive(Debug, Clone, PartialEq)]
15734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15736#[cfg_attr(feature = "ts", derive(TS))]
15737#[cfg_attr(feature = "ts", ts(export))]
15738pub struct GLOBAL_POSITION_INT_COV_DATA {
15739 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15740 pub time_usec: u64,
15741 #[doc = "Latitude"]
15742 pub lat: i32,
15743 #[doc = "Longitude"]
15744 pub lon: i32,
15745 #[doc = "Altitude in meters above MSL"]
15746 pub alt: i32,
15747 #[doc = "Altitude above ground"]
15748 pub relative_alt: i32,
15749 #[doc = "Ground X Speed (Latitude)"]
15750 pub vx: f32,
15751 #[doc = "Ground Y Speed (Longitude)"]
15752 pub vy: f32,
15753 #[doc = "Ground Z Speed (Altitude)"]
15754 pub vz: f32,
15755 #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
15756 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15757 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15758 pub covariance: [f32; 36],
15759 #[doc = "Class id of the estimator this estimate originated from."]
15760 pub estimator_type: MavEstimatorType,
15761}
15762impl GLOBAL_POSITION_INT_COV_DATA {
15763 pub const ENCODED_LEN: usize = 181usize;
15764 pub const DEFAULT: Self = Self {
15765 time_usec: 0_u64,
15766 lat: 0_i32,
15767 lon: 0_i32,
15768 alt: 0_i32,
15769 relative_alt: 0_i32,
15770 vx: 0.0_f32,
15771 vy: 0.0_f32,
15772 vz: 0.0_f32,
15773 covariance: [0.0_f32; 36usize],
15774 estimator_type: MavEstimatorType::DEFAULT,
15775 };
15776 #[cfg(feature = "arbitrary")]
15777 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15778 use arbitrary::{Arbitrary, Unstructured};
15779 let mut buf = [0u8; 1024];
15780 rng.fill_bytes(&mut buf);
15781 let mut unstructured = Unstructured::new(&buf);
15782 Self::arbitrary(&mut unstructured).unwrap_or_default()
15783 }
15784}
15785impl Default for GLOBAL_POSITION_INT_COV_DATA {
15786 fn default() -> Self {
15787 Self::DEFAULT.clone()
15788 }
15789}
15790impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
15791 type Message = MavMessage;
15792 const ID: u32 = 63u32;
15793 const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
15794 const EXTRA_CRC: u8 = 119u8;
15795 const ENCODED_LEN: usize = 181usize;
15796 fn deser(
15797 _version: MavlinkVersion,
15798 __input: &[u8],
15799 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15800 let avail_len = __input.len();
15801 let mut payload_buf = [0; Self::ENCODED_LEN];
15802 let mut buf = if avail_len < Self::ENCODED_LEN {
15803 payload_buf[0..avail_len].copy_from_slice(__input);
15804 Bytes::new(&payload_buf)
15805 } else {
15806 Bytes::new(__input)
15807 };
15808 let mut __struct = Self::default();
15809 __struct.time_usec = buf.get_u64_le()?;
15810 __struct.lat = buf.get_i32_le()?;
15811 __struct.lon = buf.get_i32_le()?;
15812 __struct.alt = buf.get_i32_le()?;
15813 __struct.relative_alt = buf.get_i32_le()?;
15814 __struct.vx = buf.get_f32_le()?;
15815 __struct.vy = buf.get_f32_le()?;
15816 __struct.vz = buf.get_f32_le()?;
15817 for v in &mut __struct.covariance {
15818 let val = buf.get_f32_le()?;
15819 *v = val;
15820 }
15821 let tmp = buf.get_u8()?;
15822 __struct.estimator_type =
15823 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15824 enum_type: "MavEstimatorType",
15825 value: tmp as u64,
15826 })?;
15827 Ok(__struct)
15828 }
15829 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15830 let mut __tmp = BytesMut::new(bytes);
15831 #[allow(clippy::absurd_extreme_comparisons)]
15832 #[allow(unused_comparisons)]
15833 if __tmp.remaining() < Self::ENCODED_LEN {
15834 panic!(
15835 "buffer is too small (need {} bytes, but got {})",
15836 Self::ENCODED_LEN,
15837 __tmp.remaining(),
15838 )
15839 }
15840 __tmp.put_u64_le(self.time_usec);
15841 __tmp.put_i32_le(self.lat);
15842 __tmp.put_i32_le(self.lon);
15843 __tmp.put_i32_le(self.alt);
15844 __tmp.put_i32_le(self.relative_alt);
15845 __tmp.put_f32_le(self.vx);
15846 __tmp.put_f32_le(self.vy);
15847 __tmp.put_f32_le(self.vz);
15848 for val in &self.covariance {
15849 __tmp.put_f32_le(*val);
15850 }
15851 __tmp.put_u8(self.estimator_type as u8);
15852 if matches!(version, MavlinkVersion::V2) {
15853 let len = __tmp.len();
15854 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15855 } else {
15856 __tmp.len()
15857 }
15858 }
15859}
15860#[doc = "Global position/attitude estimate from a vision source."]
15861#[doc = ""]
15862#[doc = "ID: 101"]
15863#[derive(Debug, Clone, PartialEq)]
15864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15866#[cfg_attr(feature = "ts", derive(TS))]
15867#[cfg_attr(feature = "ts", ts(export))]
15868pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
15869 #[doc = "Timestamp (UNIX time or since system boot)"]
15870 pub usec: u64,
15871 #[doc = "Global X position"]
15872 pub x: f32,
15873 #[doc = "Global Y position"]
15874 pub y: f32,
15875 #[doc = "Global Z position"]
15876 pub z: f32,
15877 #[doc = "Roll angle"]
15878 pub roll: f32,
15879 #[doc = "Pitch angle"]
15880 pub pitch: f32,
15881 #[doc = "Yaw angle"]
15882 pub yaw: f32,
15883 #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
15884 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15885 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15886 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15887 pub covariance: [f32; 21],
15888 #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
15889 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15890 pub reset_counter: u8,
15891}
15892impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
15893 pub const ENCODED_LEN: usize = 117usize;
15894 pub const DEFAULT: Self = Self {
15895 usec: 0_u64,
15896 x: 0.0_f32,
15897 y: 0.0_f32,
15898 z: 0.0_f32,
15899 roll: 0.0_f32,
15900 pitch: 0.0_f32,
15901 yaw: 0.0_f32,
15902 covariance: [0.0_f32; 21usize],
15903 reset_counter: 0_u8,
15904 };
15905 #[cfg(feature = "arbitrary")]
15906 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15907 use arbitrary::{Arbitrary, Unstructured};
15908 let mut buf = [0u8; 1024];
15909 rng.fill_bytes(&mut buf);
15910 let mut unstructured = Unstructured::new(&buf);
15911 Self::arbitrary(&mut unstructured).unwrap_or_default()
15912 }
15913}
15914impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
15915 fn default() -> Self {
15916 Self::DEFAULT.clone()
15917 }
15918}
15919impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
15920 type Message = MavMessage;
15921 const ID: u32 = 101u32;
15922 const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
15923 const EXTRA_CRC: u8 = 102u8;
15924 const ENCODED_LEN: usize = 117usize;
15925 fn deser(
15926 _version: MavlinkVersion,
15927 __input: &[u8],
15928 ) -> Result<Self, ::mavlink_core::error::ParserError> {
15929 let avail_len = __input.len();
15930 let mut payload_buf = [0; Self::ENCODED_LEN];
15931 let mut buf = if avail_len < Self::ENCODED_LEN {
15932 payload_buf[0..avail_len].copy_from_slice(__input);
15933 Bytes::new(&payload_buf)
15934 } else {
15935 Bytes::new(__input)
15936 };
15937 let mut __struct = Self::default();
15938 __struct.usec = buf.get_u64_le()?;
15939 __struct.x = buf.get_f32_le()?;
15940 __struct.y = buf.get_f32_le()?;
15941 __struct.z = buf.get_f32_le()?;
15942 __struct.roll = buf.get_f32_le()?;
15943 __struct.pitch = buf.get_f32_le()?;
15944 __struct.yaw = buf.get_f32_le()?;
15945 for v in &mut __struct.covariance {
15946 let val = buf.get_f32_le()?;
15947 *v = val;
15948 }
15949 __struct.reset_counter = buf.get_u8()?;
15950 Ok(__struct)
15951 }
15952 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15953 let mut __tmp = BytesMut::new(bytes);
15954 #[allow(clippy::absurd_extreme_comparisons)]
15955 #[allow(unused_comparisons)]
15956 if __tmp.remaining() < Self::ENCODED_LEN {
15957 panic!(
15958 "buffer is too small (need {} bytes, but got {})",
15959 Self::ENCODED_LEN,
15960 __tmp.remaining(),
15961 )
15962 }
15963 __tmp.put_u64_le(self.usec);
15964 __tmp.put_f32_le(self.x);
15965 __tmp.put_f32_le(self.y);
15966 __tmp.put_f32_le(self.z);
15967 __tmp.put_f32_le(self.roll);
15968 __tmp.put_f32_le(self.pitch);
15969 __tmp.put_f32_le(self.yaw);
15970 if matches!(version, MavlinkVersion::V2) {
15971 for val in &self.covariance {
15972 __tmp.put_f32_le(*val);
15973 }
15974 __tmp.put_u8(self.reset_counter);
15975 let len = __tmp.len();
15976 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15977 } else {
15978 __tmp.len()
15979 }
15980 }
15981}
15982#[doc = "Second GPS data."]
15983#[doc = ""]
15984#[doc = "ID: 124"]
15985#[derive(Debug, Clone, PartialEq)]
15986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15988#[cfg_attr(feature = "ts", derive(TS))]
15989#[cfg_attr(feature = "ts", ts(export))]
15990pub struct GPS2_RAW_DATA {
15991 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15992 pub time_usec: u64,
15993 #[doc = "Latitude (WGS84)"]
15994 pub lat: i32,
15995 #[doc = "Longitude (WGS84)"]
15996 pub lon: i32,
15997 #[doc = "Altitude (MSL). Positive for up."]
15998 pub alt: i32,
15999 #[doc = "Age of DGPS info"]
16000 pub dgps_age: u32,
16001 #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16002 pub eph: u16,
16003 #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16004 pub epv: u16,
16005 #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16006 pub vel: u16,
16007 #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16008 pub cog: u16,
16009 #[doc = "GPS fix type."]
16010 pub fix_type: GpsFixType,
16011 #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16012 pub satellites_visible: u8,
16013 #[doc = "Number of DGPS satellites"]
16014 pub dgps_numch: u8,
16015 #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
16016 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16017 pub yaw: u16,
16018 #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
16019 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16020 pub alt_ellipsoid: i32,
16021 #[doc = "Position uncertainty."]
16022 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16023 pub h_acc: u32,
16024 #[doc = "Altitude uncertainty."]
16025 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16026 pub v_acc: u32,
16027 #[doc = "Speed uncertainty."]
16028 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16029 pub vel_acc: u32,
16030 #[doc = "Heading / track uncertainty"]
16031 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16032 pub hdg_acc: u32,
16033}
16034impl GPS2_RAW_DATA {
16035 pub const ENCODED_LEN: usize = 57usize;
16036 pub const DEFAULT: Self = Self {
16037 time_usec: 0_u64,
16038 lat: 0_i32,
16039 lon: 0_i32,
16040 alt: 0_i32,
16041 dgps_age: 0_u32,
16042 eph: 0_u16,
16043 epv: 0_u16,
16044 vel: 0_u16,
16045 cog: 0_u16,
16046 fix_type: GpsFixType::DEFAULT,
16047 satellites_visible: 0_u8,
16048 dgps_numch: 0_u8,
16049 yaw: 0_u16,
16050 alt_ellipsoid: 0_i32,
16051 h_acc: 0_u32,
16052 v_acc: 0_u32,
16053 vel_acc: 0_u32,
16054 hdg_acc: 0_u32,
16055 };
16056 #[cfg(feature = "arbitrary")]
16057 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16058 use arbitrary::{Arbitrary, Unstructured};
16059 let mut buf = [0u8; 1024];
16060 rng.fill_bytes(&mut buf);
16061 let mut unstructured = Unstructured::new(&buf);
16062 Self::arbitrary(&mut unstructured).unwrap_or_default()
16063 }
16064}
16065impl Default for GPS2_RAW_DATA {
16066 fn default() -> Self {
16067 Self::DEFAULT.clone()
16068 }
16069}
16070impl MessageData for GPS2_RAW_DATA {
16071 type Message = MavMessage;
16072 const ID: u32 = 124u32;
16073 const NAME: &'static str = "GPS2_RAW";
16074 const EXTRA_CRC: u8 = 87u8;
16075 const ENCODED_LEN: usize = 57usize;
16076 fn deser(
16077 _version: MavlinkVersion,
16078 __input: &[u8],
16079 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16080 let avail_len = __input.len();
16081 let mut payload_buf = [0; Self::ENCODED_LEN];
16082 let mut buf = if avail_len < Self::ENCODED_LEN {
16083 payload_buf[0..avail_len].copy_from_slice(__input);
16084 Bytes::new(&payload_buf)
16085 } else {
16086 Bytes::new(__input)
16087 };
16088 let mut __struct = Self::default();
16089 __struct.time_usec = buf.get_u64_le()?;
16090 __struct.lat = buf.get_i32_le()?;
16091 __struct.lon = buf.get_i32_le()?;
16092 __struct.alt = buf.get_i32_le()?;
16093 __struct.dgps_age = buf.get_u32_le()?;
16094 __struct.eph = buf.get_u16_le()?;
16095 __struct.epv = buf.get_u16_le()?;
16096 __struct.vel = buf.get_u16_le()?;
16097 __struct.cog = buf.get_u16_le()?;
16098 let tmp = buf.get_u8()?;
16099 __struct.fix_type =
16100 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16101 enum_type: "GpsFixType",
16102 value: tmp as u64,
16103 })?;
16104 __struct.satellites_visible = buf.get_u8()?;
16105 __struct.dgps_numch = buf.get_u8()?;
16106 __struct.yaw = buf.get_u16_le()?;
16107 __struct.alt_ellipsoid = buf.get_i32_le()?;
16108 __struct.h_acc = buf.get_u32_le()?;
16109 __struct.v_acc = buf.get_u32_le()?;
16110 __struct.vel_acc = buf.get_u32_le()?;
16111 __struct.hdg_acc = buf.get_u32_le()?;
16112 Ok(__struct)
16113 }
16114 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16115 let mut __tmp = BytesMut::new(bytes);
16116 #[allow(clippy::absurd_extreme_comparisons)]
16117 #[allow(unused_comparisons)]
16118 if __tmp.remaining() < Self::ENCODED_LEN {
16119 panic!(
16120 "buffer is too small (need {} bytes, but got {})",
16121 Self::ENCODED_LEN,
16122 __tmp.remaining(),
16123 )
16124 }
16125 __tmp.put_u64_le(self.time_usec);
16126 __tmp.put_i32_le(self.lat);
16127 __tmp.put_i32_le(self.lon);
16128 __tmp.put_i32_le(self.alt);
16129 __tmp.put_u32_le(self.dgps_age);
16130 __tmp.put_u16_le(self.eph);
16131 __tmp.put_u16_le(self.epv);
16132 __tmp.put_u16_le(self.vel);
16133 __tmp.put_u16_le(self.cog);
16134 __tmp.put_u8(self.fix_type as u8);
16135 __tmp.put_u8(self.satellites_visible);
16136 __tmp.put_u8(self.dgps_numch);
16137 if matches!(version, MavlinkVersion::V2) {
16138 __tmp.put_u16_le(self.yaw);
16139 __tmp.put_i32_le(self.alt_ellipsoid);
16140 __tmp.put_u32_le(self.h_acc);
16141 __tmp.put_u32_le(self.v_acc);
16142 __tmp.put_u32_le(self.vel_acc);
16143 __tmp.put_u32_le(self.hdg_acc);
16144 let len = __tmp.len();
16145 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16146 } else {
16147 __tmp.len()
16148 }
16149 }
16150}
16151#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
16152#[doc = ""]
16153#[doc = "ID: 128"]
16154#[derive(Debug, Clone, PartialEq)]
16155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16157#[cfg_attr(feature = "ts", derive(TS))]
16158#[cfg_attr(feature = "ts", ts(export))]
16159pub struct GPS2_RTK_DATA {
16160 #[doc = "Time since boot of last baseline message received."]
16161 pub time_last_baseline_ms: u32,
16162 #[doc = "GPS Time of Week of last baseline"]
16163 pub tow: u32,
16164 #[doc = "Current baseline in ECEF x or NED north component."]
16165 pub baseline_a_mm: i32,
16166 #[doc = "Current baseline in ECEF y or NED east component."]
16167 pub baseline_b_mm: i32,
16168 #[doc = "Current baseline in ECEF z or NED down component."]
16169 pub baseline_c_mm: i32,
16170 #[doc = "Current estimate of baseline accuracy."]
16171 pub accuracy: u32,
16172 #[doc = "Current number of integer ambiguity hypotheses."]
16173 pub iar_num_hypotheses: i32,
16174 #[doc = "GPS Week Number of last baseline"]
16175 pub wn: u16,
16176 #[doc = "Identification of connected RTK receiver."]
16177 pub rtk_receiver_id: u8,
16178 #[doc = "GPS-specific health report for RTK data."]
16179 pub rtk_health: u8,
16180 #[doc = "Rate of baseline messages being received by GPS"]
16181 pub rtk_rate: u8,
16182 #[doc = "Current number of sats used for RTK calculation."]
16183 pub nsats: u8,
16184 #[doc = "Coordinate system of baseline"]
16185 pub baseline_coords_type: RtkBaselineCoordinateSystem,
16186}
16187impl GPS2_RTK_DATA {
16188 pub const ENCODED_LEN: usize = 35usize;
16189 pub const DEFAULT: Self = Self {
16190 time_last_baseline_ms: 0_u32,
16191 tow: 0_u32,
16192 baseline_a_mm: 0_i32,
16193 baseline_b_mm: 0_i32,
16194 baseline_c_mm: 0_i32,
16195 accuracy: 0_u32,
16196 iar_num_hypotheses: 0_i32,
16197 wn: 0_u16,
16198 rtk_receiver_id: 0_u8,
16199 rtk_health: 0_u8,
16200 rtk_rate: 0_u8,
16201 nsats: 0_u8,
16202 baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
16203 };
16204 #[cfg(feature = "arbitrary")]
16205 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16206 use arbitrary::{Arbitrary, Unstructured};
16207 let mut buf = [0u8; 1024];
16208 rng.fill_bytes(&mut buf);
16209 let mut unstructured = Unstructured::new(&buf);
16210 Self::arbitrary(&mut unstructured).unwrap_or_default()
16211 }
16212}
16213impl Default for GPS2_RTK_DATA {
16214 fn default() -> Self {
16215 Self::DEFAULT.clone()
16216 }
16217}
16218impl MessageData for GPS2_RTK_DATA {
16219 type Message = MavMessage;
16220 const ID: u32 = 128u32;
16221 const NAME: &'static str = "GPS2_RTK";
16222 const EXTRA_CRC: u8 = 226u8;
16223 const ENCODED_LEN: usize = 35usize;
16224 fn deser(
16225 _version: MavlinkVersion,
16226 __input: &[u8],
16227 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16228 let avail_len = __input.len();
16229 let mut payload_buf = [0; Self::ENCODED_LEN];
16230 let mut buf = if avail_len < Self::ENCODED_LEN {
16231 payload_buf[0..avail_len].copy_from_slice(__input);
16232 Bytes::new(&payload_buf)
16233 } else {
16234 Bytes::new(__input)
16235 };
16236 let mut __struct = Self::default();
16237 __struct.time_last_baseline_ms = buf.get_u32_le()?;
16238 __struct.tow = buf.get_u32_le()?;
16239 __struct.baseline_a_mm = buf.get_i32_le()?;
16240 __struct.baseline_b_mm = buf.get_i32_le()?;
16241 __struct.baseline_c_mm = buf.get_i32_le()?;
16242 __struct.accuracy = buf.get_u32_le()?;
16243 __struct.iar_num_hypotheses = buf.get_i32_le()?;
16244 __struct.wn = buf.get_u16_le()?;
16245 __struct.rtk_receiver_id = buf.get_u8()?;
16246 __struct.rtk_health = buf.get_u8()?;
16247 __struct.rtk_rate = buf.get_u8()?;
16248 __struct.nsats = buf.get_u8()?;
16249 let tmp = buf.get_u8()?;
16250 __struct.baseline_coords_type =
16251 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16252 enum_type: "RtkBaselineCoordinateSystem",
16253 value: tmp as u64,
16254 })?;
16255 Ok(__struct)
16256 }
16257 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16258 let mut __tmp = BytesMut::new(bytes);
16259 #[allow(clippy::absurd_extreme_comparisons)]
16260 #[allow(unused_comparisons)]
16261 if __tmp.remaining() < Self::ENCODED_LEN {
16262 panic!(
16263 "buffer is too small (need {} bytes, but got {})",
16264 Self::ENCODED_LEN,
16265 __tmp.remaining(),
16266 )
16267 }
16268 __tmp.put_u32_le(self.time_last_baseline_ms);
16269 __tmp.put_u32_le(self.tow);
16270 __tmp.put_i32_le(self.baseline_a_mm);
16271 __tmp.put_i32_le(self.baseline_b_mm);
16272 __tmp.put_i32_le(self.baseline_c_mm);
16273 __tmp.put_u32_le(self.accuracy);
16274 __tmp.put_i32_le(self.iar_num_hypotheses);
16275 __tmp.put_u16_le(self.wn);
16276 __tmp.put_u8(self.rtk_receiver_id);
16277 __tmp.put_u8(self.rtk_health);
16278 __tmp.put_u8(self.rtk_rate);
16279 __tmp.put_u8(self.nsats);
16280 __tmp.put_u8(self.baseline_coords_type as u8);
16281 if matches!(version, MavlinkVersion::V2) {
16282 let len = __tmp.len();
16283 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16284 } else {
16285 __tmp.len()
16286 }
16287 }
16288}
16289#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
16290#[doc = ""]
16291#[doc = "ID: 49"]
16292#[derive(Debug, Clone, PartialEq)]
16293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16295#[cfg_attr(feature = "ts", derive(TS))]
16296#[cfg_attr(feature = "ts", ts(export))]
16297pub struct GPS_GLOBAL_ORIGIN_DATA {
16298 #[doc = "Latitude (WGS84)"]
16299 pub latitude: i32,
16300 #[doc = "Longitude (WGS84)"]
16301 pub longitude: i32,
16302 #[doc = "Altitude (MSL). Positive for up."]
16303 pub altitude: i32,
16304 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16305 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16306 pub time_usec: u64,
16307}
16308impl GPS_GLOBAL_ORIGIN_DATA {
16309 pub const ENCODED_LEN: usize = 20usize;
16310 pub const DEFAULT: Self = Self {
16311 latitude: 0_i32,
16312 longitude: 0_i32,
16313 altitude: 0_i32,
16314 time_usec: 0_u64,
16315 };
16316 #[cfg(feature = "arbitrary")]
16317 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16318 use arbitrary::{Arbitrary, Unstructured};
16319 let mut buf = [0u8; 1024];
16320 rng.fill_bytes(&mut buf);
16321 let mut unstructured = Unstructured::new(&buf);
16322 Self::arbitrary(&mut unstructured).unwrap_or_default()
16323 }
16324}
16325impl Default for GPS_GLOBAL_ORIGIN_DATA {
16326 fn default() -> Self {
16327 Self::DEFAULT.clone()
16328 }
16329}
16330impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
16331 type Message = MavMessage;
16332 const ID: u32 = 49u32;
16333 const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
16334 const EXTRA_CRC: u8 = 39u8;
16335 const ENCODED_LEN: usize = 20usize;
16336 fn deser(
16337 _version: MavlinkVersion,
16338 __input: &[u8],
16339 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16340 let avail_len = __input.len();
16341 let mut payload_buf = [0; Self::ENCODED_LEN];
16342 let mut buf = if avail_len < Self::ENCODED_LEN {
16343 payload_buf[0..avail_len].copy_from_slice(__input);
16344 Bytes::new(&payload_buf)
16345 } else {
16346 Bytes::new(__input)
16347 };
16348 let mut __struct = Self::default();
16349 __struct.latitude = buf.get_i32_le()?;
16350 __struct.longitude = buf.get_i32_le()?;
16351 __struct.altitude = buf.get_i32_le()?;
16352 __struct.time_usec = buf.get_u64_le()?;
16353 Ok(__struct)
16354 }
16355 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16356 let mut __tmp = BytesMut::new(bytes);
16357 #[allow(clippy::absurd_extreme_comparisons)]
16358 #[allow(unused_comparisons)]
16359 if __tmp.remaining() < Self::ENCODED_LEN {
16360 panic!(
16361 "buffer is too small (need {} bytes, but got {})",
16362 Self::ENCODED_LEN,
16363 __tmp.remaining(),
16364 )
16365 }
16366 __tmp.put_i32_le(self.latitude);
16367 __tmp.put_i32_le(self.longitude);
16368 __tmp.put_i32_le(self.altitude);
16369 if matches!(version, MavlinkVersion::V2) {
16370 __tmp.put_u64_le(self.time_usec);
16371 let len = __tmp.len();
16372 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16373 } else {
16374 __tmp.len()
16375 }
16376 }
16377}
16378#[deprecated = " See `GPS_RTCM_DATA` (Superseded since 2022-05)"]
16379#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
16380#[doc = ""]
16381#[doc = "ID: 123"]
16382#[derive(Debug, Clone, PartialEq)]
16383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16385#[cfg_attr(feature = "ts", derive(TS))]
16386#[cfg_attr(feature = "ts", ts(export))]
16387pub struct GPS_INJECT_DATA_DATA {
16388 #[doc = "System ID"]
16389 pub target_system: u8,
16390 #[doc = "Component ID"]
16391 pub target_component: u8,
16392 #[doc = "Data length"]
16393 pub len: u8,
16394 #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
16395 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16396 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16397 pub data: [u8; 110],
16398}
16399impl GPS_INJECT_DATA_DATA {
16400 pub const ENCODED_LEN: usize = 113usize;
16401 pub const DEFAULT: Self = Self {
16402 target_system: 0_u8,
16403 target_component: 0_u8,
16404 len: 0_u8,
16405 data: [0_u8; 110usize],
16406 };
16407 #[cfg(feature = "arbitrary")]
16408 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16409 use arbitrary::{Arbitrary, Unstructured};
16410 let mut buf = [0u8; 1024];
16411 rng.fill_bytes(&mut buf);
16412 let mut unstructured = Unstructured::new(&buf);
16413 Self::arbitrary(&mut unstructured).unwrap_or_default()
16414 }
16415}
16416impl Default for GPS_INJECT_DATA_DATA {
16417 fn default() -> Self {
16418 Self::DEFAULT.clone()
16419 }
16420}
16421impl MessageData for GPS_INJECT_DATA_DATA {
16422 type Message = MavMessage;
16423 const ID: u32 = 123u32;
16424 const NAME: &'static str = "GPS_INJECT_DATA";
16425 const EXTRA_CRC: u8 = 250u8;
16426 const ENCODED_LEN: usize = 113usize;
16427 fn deser(
16428 _version: MavlinkVersion,
16429 __input: &[u8],
16430 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16431 let avail_len = __input.len();
16432 let mut payload_buf = [0; Self::ENCODED_LEN];
16433 let mut buf = if avail_len < Self::ENCODED_LEN {
16434 payload_buf[0..avail_len].copy_from_slice(__input);
16435 Bytes::new(&payload_buf)
16436 } else {
16437 Bytes::new(__input)
16438 };
16439 let mut __struct = Self::default();
16440 __struct.target_system = buf.get_u8()?;
16441 __struct.target_component = buf.get_u8()?;
16442 __struct.len = buf.get_u8()?;
16443 for v in &mut __struct.data {
16444 let val = buf.get_u8()?;
16445 *v = val;
16446 }
16447 Ok(__struct)
16448 }
16449 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16450 let mut __tmp = BytesMut::new(bytes);
16451 #[allow(clippy::absurd_extreme_comparisons)]
16452 #[allow(unused_comparisons)]
16453 if __tmp.remaining() < Self::ENCODED_LEN {
16454 panic!(
16455 "buffer is too small (need {} bytes, but got {})",
16456 Self::ENCODED_LEN,
16457 __tmp.remaining(),
16458 )
16459 }
16460 __tmp.put_u8(self.target_system);
16461 __tmp.put_u8(self.target_component);
16462 __tmp.put_u8(self.len);
16463 for val in &self.data {
16464 __tmp.put_u8(*val);
16465 }
16466 if matches!(version, MavlinkVersion::V2) {
16467 let len = __tmp.len();
16468 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16469 } else {
16470 __tmp.len()
16471 }
16472 }
16473}
16474#[doc = "GPS sensor input message. This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
16475#[doc = ""]
16476#[doc = "ID: 232"]
16477#[derive(Debug, Clone, PartialEq)]
16478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16479#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16480#[cfg_attr(feature = "ts", derive(TS))]
16481#[cfg_attr(feature = "ts", ts(export))]
16482pub struct GPS_INPUT_DATA {
16483 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16484 pub time_usec: u64,
16485 #[doc = "GPS time (from start of GPS week)"]
16486 pub time_week_ms: u32,
16487 #[doc = "Latitude (WGS84)"]
16488 pub lat: i32,
16489 #[doc = "Longitude (WGS84)"]
16490 pub lon: i32,
16491 #[doc = "Altitude (MSL). Positive for up."]
16492 pub alt: f32,
16493 #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
16494 pub hdop: f32,
16495 #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
16496 pub vdop: f32,
16497 #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16498 pub vn: f32,
16499 #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16500 pub ve: f32,
16501 #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16502 pub vd: f32,
16503 #[doc = "GPS speed accuracy"]
16504 pub speed_accuracy: f32,
16505 #[doc = "GPS horizontal accuracy"]
16506 pub horiz_accuracy: f32,
16507 #[doc = "GPS vertical accuracy"]
16508 pub vert_accuracy: f32,
16509 #[doc = "Bitmap indicating which GPS input flags fields to ignore. All other fields must be provided."]
16510 pub ignore_flags: GpsInputIgnoreFlags,
16511 #[doc = "GPS week number"]
16512 pub time_week: u16,
16513 #[doc = "ID of the GPS for multiple GPS inputs"]
16514 pub gps_id: u8,
16515 #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
16516 pub fix_type: u8,
16517 #[doc = "Number of satellites visible."]
16518 pub satellites_visible: u8,
16519 #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16520 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16521 pub yaw: u16,
16522}
16523impl GPS_INPUT_DATA {
16524 pub const ENCODED_LEN: usize = 65usize;
16525 pub const DEFAULT: Self = Self {
16526 time_usec: 0_u64,
16527 time_week_ms: 0_u32,
16528 lat: 0_i32,
16529 lon: 0_i32,
16530 alt: 0.0_f32,
16531 hdop: 0.0_f32,
16532 vdop: 0.0_f32,
16533 vn: 0.0_f32,
16534 ve: 0.0_f32,
16535 vd: 0.0_f32,
16536 speed_accuracy: 0.0_f32,
16537 horiz_accuracy: 0.0_f32,
16538 vert_accuracy: 0.0_f32,
16539 ignore_flags: GpsInputIgnoreFlags::DEFAULT,
16540 time_week: 0_u16,
16541 gps_id: 0_u8,
16542 fix_type: 0_u8,
16543 satellites_visible: 0_u8,
16544 yaw: 0_u16,
16545 };
16546 #[cfg(feature = "arbitrary")]
16547 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16548 use arbitrary::{Arbitrary, Unstructured};
16549 let mut buf = [0u8; 1024];
16550 rng.fill_bytes(&mut buf);
16551 let mut unstructured = Unstructured::new(&buf);
16552 Self::arbitrary(&mut unstructured).unwrap_or_default()
16553 }
16554}
16555impl Default for GPS_INPUT_DATA {
16556 fn default() -> Self {
16557 Self::DEFAULT.clone()
16558 }
16559}
16560impl MessageData for GPS_INPUT_DATA {
16561 type Message = MavMessage;
16562 const ID: u32 = 232u32;
16563 const NAME: &'static str = "GPS_INPUT";
16564 const EXTRA_CRC: u8 = 151u8;
16565 const ENCODED_LEN: usize = 65usize;
16566 fn deser(
16567 _version: MavlinkVersion,
16568 __input: &[u8],
16569 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16570 let avail_len = __input.len();
16571 let mut payload_buf = [0; Self::ENCODED_LEN];
16572 let mut buf = if avail_len < Self::ENCODED_LEN {
16573 payload_buf[0..avail_len].copy_from_slice(__input);
16574 Bytes::new(&payload_buf)
16575 } else {
16576 Bytes::new(__input)
16577 };
16578 let mut __struct = Self::default();
16579 __struct.time_usec = buf.get_u64_le()?;
16580 __struct.time_week_ms = buf.get_u32_le()?;
16581 __struct.lat = buf.get_i32_le()?;
16582 __struct.lon = buf.get_i32_le()?;
16583 __struct.alt = buf.get_f32_le()?;
16584 __struct.hdop = buf.get_f32_le()?;
16585 __struct.vdop = buf.get_f32_le()?;
16586 __struct.vn = buf.get_f32_le()?;
16587 __struct.ve = buf.get_f32_le()?;
16588 __struct.vd = buf.get_f32_le()?;
16589 __struct.speed_accuracy = buf.get_f32_le()?;
16590 __struct.horiz_accuracy = buf.get_f32_le()?;
16591 __struct.vert_accuracy = buf.get_f32_le()?;
16592 let tmp = buf.get_u16_le()?;
16593 __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
16594 tmp as <GpsInputIgnoreFlags as Flags>::Bits,
16595 )
16596 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16597 flag_type: "GpsInputIgnoreFlags",
16598 value: tmp as u64,
16599 })?;
16600 __struct.time_week = buf.get_u16_le()?;
16601 __struct.gps_id = buf.get_u8()?;
16602 __struct.fix_type = buf.get_u8()?;
16603 __struct.satellites_visible = buf.get_u8()?;
16604 __struct.yaw = buf.get_u16_le()?;
16605 Ok(__struct)
16606 }
16607 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16608 let mut __tmp = BytesMut::new(bytes);
16609 #[allow(clippy::absurd_extreme_comparisons)]
16610 #[allow(unused_comparisons)]
16611 if __tmp.remaining() < Self::ENCODED_LEN {
16612 panic!(
16613 "buffer is too small (need {} bytes, but got {})",
16614 Self::ENCODED_LEN,
16615 __tmp.remaining(),
16616 )
16617 }
16618 __tmp.put_u64_le(self.time_usec);
16619 __tmp.put_u32_le(self.time_week_ms);
16620 __tmp.put_i32_le(self.lat);
16621 __tmp.put_i32_le(self.lon);
16622 __tmp.put_f32_le(self.alt);
16623 __tmp.put_f32_le(self.hdop);
16624 __tmp.put_f32_le(self.vdop);
16625 __tmp.put_f32_le(self.vn);
16626 __tmp.put_f32_le(self.ve);
16627 __tmp.put_f32_le(self.vd);
16628 __tmp.put_f32_le(self.speed_accuracy);
16629 __tmp.put_f32_le(self.horiz_accuracy);
16630 __tmp.put_f32_le(self.vert_accuracy);
16631 __tmp.put_u16_le(self.ignore_flags.bits() as u16);
16632 __tmp.put_u16_le(self.time_week);
16633 __tmp.put_u8(self.gps_id);
16634 __tmp.put_u8(self.fix_type);
16635 __tmp.put_u8(self.satellites_visible);
16636 if matches!(version, MavlinkVersion::V2) {
16637 __tmp.put_u16_le(self.yaw);
16638 let len = __tmp.len();
16639 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16640 } else {
16641 __tmp.len()
16642 }
16643 }
16644}
16645#[doc = "The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16646#[doc = ""]
16647#[doc = "ID: 24"]
16648#[derive(Debug, Clone, PartialEq)]
16649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16651#[cfg_attr(feature = "ts", derive(TS))]
16652#[cfg_attr(feature = "ts", ts(export))]
16653pub struct GPS_RAW_INT_DATA {
16654 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16655 pub time_usec: u64,
16656 #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
16657 pub lat: i32,
16658 #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
16659 pub lon: i32,
16660 #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
16661 pub alt: i32,
16662 #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16663 pub eph: u16,
16664 #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16665 pub epv: u16,
16666 #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16667 pub vel: u16,
16668 #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16669 pub cog: u16,
16670 #[doc = "GPS fix type."]
16671 pub fix_type: GpsFixType,
16672 #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16673 pub satellites_visible: u8,
16674 #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
16675 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16676 pub alt_ellipsoid: i32,
16677 #[doc = "Position uncertainty."]
16678 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16679 pub h_acc: u32,
16680 #[doc = "Altitude uncertainty."]
16681 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16682 pub v_acc: u32,
16683 #[doc = "Speed uncertainty."]
16684 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16685 pub vel_acc: u32,
16686 #[doc = "Heading / track uncertainty"]
16687 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16688 pub hdg_acc: u32,
16689 #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
16690 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16691 pub yaw: u16,
16692}
16693impl GPS_RAW_INT_DATA {
16694 pub const ENCODED_LEN: usize = 52usize;
16695 pub const DEFAULT: Self = Self {
16696 time_usec: 0_u64,
16697 lat: 0_i32,
16698 lon: 0_i32,
16699 alt: 0_i32,
16700 eph: 0_u16,
16701 epv: 0_u16,
16702 vel: 0_u16,
16703 cog: 0_u16,
16704 fix_type: GpsFixType::DEFAULT,
16705 satellites_visible: 0_u8,
16706 alt_ellipsoid: 0_i32,
16707 h_acc: 0_u32,
16708 v_acc: 0_u32,
16709 vel_acc: 0_u32,
16710 hdg_acc: 0_u32,
16711 yaw: 0_u16,
16712 };
16713 #[cfg(feature = "arbitrary")]
16714 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16715 use arbitrary::{Arbitrary, Unstructured};
16716 let mut buf = [0u8; 1024];
16717 rng.fill_bytes(&mut buf);
16718 let mut unstructured = Unstructured::new(&buf);
16719 Self::arbitrary(&mut unstructured).unwrap_or_default()
16720 }
16721}
16722impl Default for GPS_RAW_INT_DATA {
16723 fn default() -> Self {
16724 Self::DEFAULT.clone()
16725 }
16726}
16727impl MessageData for GPS_RAW_INT_DATA {
16728 type Message = MavMessage;
16729 const ID: u32 = 24u32;
16730 const NAME: &'static str = "GPS_RAW_INT";
16731 const EXTRA_CRC: u8 = 24u8;
16732 const ENCODED_LEN: usize = 52usize;
16733 fn deser(
16734 _version: MavlinkVersion,
16735 __input: &[u8],
16736 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16737 let avail_len = __input.len();
16738 let mut payload_buf = [0; Self::ENCODED_LEN];
16739 let mut buf = if avail_len < Self::ENCODED_LEN {
16740 payload_buf[0..avail_len].copy_from_slice(__input);
16741 Bytes::new(&payload_buf)
16742 } else {
16743 Bytes::new(__input)
16744 };
16745 let mut __struct = Self::default();
16746 __struct.time_usec = buf.get_u64_le()?;
16747 __struct.lat = buf.get_i32_le()?;
16748 __struct.lon = buf.get_i32_le()?;
16749 __struct.alt = buf.get_i32_le()?;
16750 __struct.eph = buf.get_u16_le()?;
16751 __struct.epv = buf.get_u16_le()?;
16752 __struct.vel = buf.get_u16_le()?;
16753 __struct.cog = buf.get_u16_le()?;
16754 let tmp = buf.get_u8()?;
16755 __struct.fix_type =
16756 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16757 enum_type: "GpsFixType",
16758 value: tmp as u64,
16759 })?;
16760 __struct.satellites_visible = buf.get_u8()?;
16761 __struct.alt_ellipsoid = buf.get_i32_le()?;
16762 __struct.h_acc = buf.get_u32_le()?;
16763 __struct.v_acc = buf.get_u32_le()?;
16764 __struct.vel_acc = buf.get_u32_le()?;
16765 __struct.hdg_acc = buf.get_u32_le()?;
16766 __struct.yaw = buf.get_u16_le()?;
16767 Ok(__struct)
16768 }
16769 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16770 let mut __tmp = BytesMut::new(bytes);
16771 #[allow(clippy::absurd_extreme_comparisons)]
16772 #[allow(unused_comparisons)]
16773 if __tmp.remaining() < Self::ENCODED_LEN {
16774 panic!(
16775 "buffer is too small (need {} bytes, but got {})",
16776 Self::ENCODED_LEN,
16777 __tmp.remaining(),
16778 )
16779 }
16780 __tmp.put_u64_le(self.time_usec);
16781 __tmp.put_i32_le(self.lat);
16782 __tmp.put_i32_le(self.lon);
16783 __tmp.put_i32_le(self.alt);
16784 __tmp.put_u16_le(self.eph);
16785 __tmp.put_u16_le(self.epv);
16786 __tmp.put_u16_le(self.vel);
16787 __tmp.put_u16_le(self.cog);
16788 __tmp.put_u8(self.fix_type as u8);
16789 __tmp.put_u8(self.satellites_visible);
16790 if matches!(version, MavlinkVersion::V2) {
16791 __tmp.put_i32_le(self.alt_ellipsoid);
16792 __tmp.put_u32_le(self.h_acc);
16793 __tmp.put_u32_le(self.v_acc);
16794 __tmp.put_u32_le(self.vel_acc);
16795 __tmp.put_u32_le(self.hdg_acc);
16796 __tmp.put_u16_le(self.yaw);
16797 let len = __tmp.len();
16798 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16799 } else {
16800 __tmp.len()
16801 }
16802 }
16803}
16804#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
16805#[doc = ""]
16806#[doc = "ID: 233"]
16807#[derive(Debug, Clone, PartialEq)]
16808#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16809#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16810#[cfg_attr(feature = "ts", derive(TS))]
16811#[cfg_attr(feature = "ts", ts(export))]
16812pub struct GPS_RTCM_DATA_DATA {
16813 #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
16814 pub flags: u8,
16815 #[doc = "data length"]
16816 pub len: u8,
16817 #[doc = "RTCM message (may be fragmented)"]
16818 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16819 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16820 pub data: [u8; 180],
16821}
16822impl GPS_RTCM_DATA_DATA {
16823 pub const ENCODED_LEN: usize = 182usize;
16824 pub const DEFAULT: Self = Self {
16825 flags: 0_u8,
16826 len: 0_u8,
16827 data: [0_u8; 180usize],
16828 };
16829 #[cfg(feature = "arbitrary")]
16830 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16831 use arbitrary::{Arbitrary, Unstructured};
16832 let mut buf = [0u8; 1024];
16833 rng.fill_bytes(&mut buf);
16834 let mut unstructured = Unstructured::new(&buf);
16835 Self::arbitrary(&mut unstructured).unwrap_or_default()
16836 }
16837}
16838impl Default for GPS_RTCM_DATA_DATA {
16839 fn default() -> Self {
16840 Self::DEFAULT.clone()
16841 }
16842}
16843impl MessageData for GPS_RTCM_DATA_DATA {
16844 type Message = MavMessage;
16845 const ID: u32 = 233u32;
16846 const NAME: &'static str = "GPS_RTCM_DATA";
16847 const EXTRA_CRC: u8 = 35u8;
16848 const ENCODED_LEN: usize = 182usize;
16849 fn deser(
16850 _version: MavlinkVersion,
16851 __input: &[u8],
16852 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16853 let avail_len = __input.len();
16854 let mut payload_buf = [0; Self::ENCODED_LEN];
16855 let mut buf = if avail_len < Self::ENCODED_LEN {
16856 payload_buf[0..avail_len].copy_from_slice(__input);
16857 Bytes::new(&payload_buf)
16858 } else {
16859 Bytes::new(__input)
16860 };
16861 let mut __struct = Self::default();
16862 __struct.flags = buf.get_u8()?;
16863 __struct.len = buf.get_u8()?;
16864 for v in &mut __struct.data {
16865 let val = buf.get_u8()?;
16866 *v = val;
16867 }
16868 Ok(__struct)
16869 }
16870 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16871 let mut __tmp = BytesMut::new(bytes);
16872 #[allow(clippy::absurd_extreme_comparisons)]
16873 #[allow(unused_comparisons)]
16874 if __tmp.remaining() < Self::ENCODED_LEN {
16875 panic!(
16876 "buffer is too small (need {} bytes, but got {})",
16877 Self::ENCODED_LEN,
16878 __tmp.remaining(),
16879 )
16880 }
16881 __tmp.put_u8(self.flags);
16882 __tmp.put_u8(self.len);
16883 for val in &self.data {
16884 __tmp.put_u8(*val);
16885 }
16886 if matches!(version, MavlinkVersion::V2) {
16887 let len = __tmp.len();
16888 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16889 } else {
16890 __tmp.len()
16891 }
16892 }
16893}
16894#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
16895#[doc = ""]
16896#[doc = "ID: 127"]
16897#[derive(Debug, Clone, PartialEq)]
16898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16900#[cfg_attr(feature = "ts", derive(TS))]
16901#[cfg_attr(feature = "ts", ts(export))]
16902pub struct GPS_RTK_DATA {
16903 #[doc = "Time since boot of last baseline message received."]
16904 pub time_last_baseline_ms: u32,
16905 #[doc = "GPS Time of Week of last baseline"]
16906 pub tow: u32,
16907 #[doc = "Current baseline in ECEF x or NED north component."]
16908 pub baseline_a_mm: i32,
16909 #[doc = "Current baseline in ECEF y or NED east component."]
16910 pub baseline_b_mm: i32,
16911 #[doc = "Current baseline in ECEF z or NED down component."]
16912 pub baseline_c_mm: i32,
16913 #[doc = "Current estimate of baseline accuracy."]
16914 pub accuracy: u32,
16915 #[doc = "Current number of integer ambiguity hypotheses."]
16916 pub iar_num_hypotheses: i32,
16917 #[doc = "GPS Week Number of last baseline"]
16918 pub wn: u16,
16919 #[doc = "Identification of connected RTK receiver."]
16920 pub rtk_receiver_id: u8,
16921 #[doc = "GPS-specific health report for RTK data."]
16922 pub rtk_health: u8,
16923 #[doc = "Rate of baseline messages being received by GPS"]
16924 pub rtk_rate: u8,
16925 #[doc = "Current number of sats used for RTK calculation."]
16926 pub nsats: u8,
16927 #[doc = "Coordinate system of baseline"]
16928 pub baseline_coords_type: RtkBaselineCoordinateSystem,
16929}
16930impl GPS_RTK_DATA {
16931 pub const ENCODED_LEN: usize = 35usize;
16932 pub const DEFAULT: Self = Self {
16933 time_last_baseline_ms: 0_u32,
16934 tow: 0_u32,
16935 baseline_a_mm: 0_i32,
16936 baseline_b_mm: 0_i32,
16937 baseline_c_mm: 0_i32,
16938 accuracy: 0_u32,
16939 iar_num_hypotheses: 0_i32,
16940 wn: 0_u16,
16941 rtk_receiver_id: 0_u8,
16942 rtk_health: 0_u8,
16943 rtk_rate: 0_u8,
16944 nsats: 0_u8,
16945 baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
16946 };
16947 #[cfg(feature = "arbitrary")]
16948 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16949 use arbitrary::{Arbitrary, Unstructured};
16950 let mut buf = [0u8; 1024];
16951 rng.fill_bytes(&mut buf);
16952 let mut unstructured = Unstructured::new(&buf);
16953 Self::arbitrary(&mut unstructured).unwrap_or_default()
16954 }
16955}
16956impl Default for GPS_RTK_DATA {
16957 fn default() -> Self {
16958 Self::DEFAULT.clone()
16959 }
16960}
16961impl MessageData for GPS_RTK_DATA {
16962 type Message = MavMessage;
16963 const ID: u32 = 127u32;
16964 const NAME: &'static str = "GPS_RTK";
16965 const EXTRA_CRC: u8 = 25u8;
16966 const ENCODED_LEN: usize = 35usize;
16967 fn deser(
16968 _version: MavlinkVersion,
16969 __input: &[u8],
16970 ) -> Result<Self, ::mavlink_core::error::ParserError> {
16971 let avail_len = __input.len();
16972 let mut payload_buf = [0; Self::ENCODED_LEN];
16973 let mut buf = if avail_len < Self::ENCODED_LEN {
16974 payload_buf[0..avail_len].copy_from_slice(__input);
16975 Bytes::new(&payload_buf)
16976 } else {
16977 Bytes::new(__input)
16978 };
16979 let mut __struct = Self::default();
16980 __struct.time_last_baseline_ms = buf.get_u32_le()?;
16981 __struct.tow = buf.get_u32_le()?;
16982 __struct.baseline_a_mm = buf.get_i32_le()?;
16983 __struct.baseline_b_mm = buf.get_i32_le()?;
16984 __struct.baseline_c_mm = buf.get_i32_le()?;
16985 __struct.accuracy = buf.get_u32_le()?;
16986 __struct.iar_num_hypotheses = buf.get_i32_le()?;
16987 __struct.wn = buf.get_u16_le()?;
16988 __struct.rtk_receiver_id = buf.get_u8()?;
16989 __struct.rtk_health = buf.get_u8()?;
16990 __struct.rtk_rate = buf.get_u8()?;
16991 __struct.nsats = buf.get_u8()?;
16992 let tmp = buf.get_u8()?;
16993 __struct.baseline_coords_type =
16994 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16995 enum_type: "RtkBaselineCoordinateSystem",
16996 value: tmp as u64,
16997 })?;
16998 Ok(__struct)
16999 }
17000 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17001 let mut __tmp = BytesMut::new(bytes);
17002 #[allow(clippy::absurd_extreme_comparisons)]
17003 #[allow(unused_comparisons)]
17004 if __tmp.remaining() < Self::ENCODED_LEN {
17005 panic!(
17006 "buffer is too small (need {} bytes, but got {})",
17007 Self::ENCODED_LEN,
17008 __tmp.remaining(),
17009 )
17010 }
17011 __tmp.put_u32_le(self.time_last_baseline_ms);
17012 __tmp.put_u32_le(self.tow);
17013 __tmp.put_i32_le(self.baseline_a_mm);
17014 __tmp.put_i32_le(self.baseline_b_mm);
17015 __tmp.put_i32_le(self.baseline_c_mm);
17016 __tmp.put_u32_le(self.accuracy);
17017 __tmp.put_i32_le(self.iar_num_hypotheses);
17018 __tmp.put_u16_le(self.wn);
17019 __tmp.put_u8(self.rtk_receiver_id);
17020 __tmp.put_u8(self.rtk_health);
17021 __tmp.put_u8(self.rtk_rate);
17022 __tmp.put_u8(self.nsats);
17023 __tmp.put_u8(self.baseline_coords_type as u8);
17024 if matches!(version, MavlinkVersion::V2) {
17025 let len = __tmp.len();
17026 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17027 } else {
17028 __tmp.len()
17029 }
17030 }
17031}
17032#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
17033#[doc = ""]
17034#[doc = "ID: 25"]
17035#[derive(Debug, Clone, PartialEq)]
17036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17038#[cfg_attr(feature = "ts", derive(TS))]
17039#[cfg_attr(feature = "ts", ts(export))]
17040pub struct GPS_STATUS_DATA {
17041 #[doc = "Number of satellites visible"]
17042 pub satellites_visible: u8,
17043 #[doc = "Global satellite ID"]
17044 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17045 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17046 pub satellite_prn: [u8; 20],
17047 #[doc = "0: Satellite not used, 1: used for localization"]
17048 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17049 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17050 pub satellite_used: [u8; 20],
17051 #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
17052 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17053 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17054 pub satellite_elevation: [u8; 20],
17055 #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
17056 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17057 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17058 pub satellite_azimuth: [u8; 20],
17059 #[doc = "Signal to noise ratio of satellite"]
17060 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17061 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17062 pub satellite_snr: [u8; 20],
17063}
17064impl GPS_STATUS_DATA {
17065 pub const ENCODED_LEN: usize = 101usize;
17066 pub const DEFAULT: Self = Self {
17067 satellites_visible: 0_u8,
17068 satellite_prn: [0_u8; 20usize],
17069 satellite_used: [0_u8; 20usize],
17070 satellite_elevation: [0_u8; 20usize],
17071 satellite_azimuth: [0_u8; 20usize],
17072 satellite_snr: [0_u8; 20usize],
17073 };
17074 #[cfg(feature = "arbitrary")]
17075 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17076 use arbitrary::{Arbitrary, Unstructured};
17077 let mut buf = [0u8; 1024];
17078 rng.fill_bytes(&mut buf);
17079 let mut unstructured = Unstructured::new(&buf);
17080 Self::arbitrary(&mut unstructured).unwrap_or_default()
17081 }
17082}
17083impl Default for GPS_STATUS_DATA {
17084 fn default() -> Self {
17085 Self::DEFAULT.clone()
17086 }
17087}
17088impl MessageData for GPS_STATUS_DATA {
17089 type Message = MavMessage;
17090 const ID: u32 = 25u32;
17091 const NAME: &'static str = "GPS_STATUS";
17092 const EXTRA_CRC: u8 = 23u8;
17093 const ENCODED_LEN: usize = 101usize;
17094 fn deser(
17095 _version: MavlinkVersion,
17096 __input: &[u8],
17097 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17098 let avail_len = __input.len();
17099 let mut payload_buf = [0; Self::ENCODED_LEN];
17100 let mut buf = if avail_len < Self::ENCODED_LEN {
17101 payload_buf[0..avail_len].copy_from_slice(__input);
17102 Bytes::new(&payload_buf)
17103 } else {
17104 Bytes::new(__input)
17105 };
17106 let mut __struct = Self::default();
17107 __struct.satellites_visible = buf.get_u8()?;
17108 for v in &mut __struct.satellite_prn {
17109 let val = buf.get_u8()?;
17110 *v = val;
17111 }
17112 for v in &mut __struct.satellite_used {
17113 let val = buf.get_u8()?;
17114 *v = val;
17115 }
17116 for v in &mut __struct.satellite_elevation {
17117 let val = buf.get_u8()?;
17118 *v = val;
17119 }
17120 for v in &mut __struct.satellite_azimuth {
17121 let val = buf.get_u8()?;
17122 *v = val;
17123 }
17124 for v in &mut __struct.satellite_snr {
17125 let val = buf.get_u8()?;
17126 *v = val;
17127 }
17128 Ok(__struct)
17129 }
17130 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17131 let mut __tmp = BytesMut::new(bytes);
17132 #[allow(clippy::absurd_extreme_comparisons)]
17133 #[allow(unused_comparisons)]
17134 if __tmp.remaining() < Self::ENCODED_LEN {
17135 panic!(
17136 "buffer is too small (need {} bytes, but got {})",
17137 Self::ENCODED_LEN,
17138 __tmp.remaining(),
17139 )
17140 }
17141 __tmp.put_u8(self.satellites_visible);
17142 for val in &self.satellite_prn {
17143 __tmp.put_u8(*val);
17144 }
17145 for val in &self.satellite_used {
17146 __tmp.put_u8(*val);
17147 }
17148 for val in &self.satellite_elevation {
17149 __tmp.put_u8(*val);
17150 }
17151 for val in &self.satellite_azimuth {
17152 __tmp.put_u8(*val);
17153 }
17154 for val in &self.satellite_snr {
17155 __tmp.put_u8(*val);
17156 }
17157 if matches!(version, MavlinkVersion::V2) {
17158 let len = __tmp.len();
17159 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17160 } else {
17161 __tmp.len()
17162 }
17163 }
17164}
17165#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
17166#[doc = ""]
17167#[doc = "ID: 0"]
17168#[derive(Debug, Clone, PartialEq)]
17169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17171#[cfg_attr(feature = "ts", derive(TS))]
17172#[cfg_attr(feature = "ts", ts(export))]
17173pub struct HEARTBEAT_DATA {
17174 #[doc = "A bitfield for use for autopilot-specific flags"]
17175 pub custom_mode: u32,
17176 #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
17177 pub mavtype: MavType,
17178 #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
17179 pub autopilot: MavAutopilot,
17180 #[doc = "System mode bitmap."]
17181 pub base_mode: MavModeFlag,
17182 #[doc = "System status flag."]
17183 pub system_status: MavState,
17184 #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
17185 pub mavlink_version: u8,
17186}
17187impl HEARTBEAT_DATA {
17188 pub const ENCODED_LEN: usize = 9usize;
17189 pub const DEFAULT: Self = Self {
17190 custom_mode: 0_u32,
17191 mavtype: MavType::DEFAULT,
17192 autopilot: MavAutopilot::DEFAULT,
17193 base_mode: MavModeFlag::DEFAULT,
17194 system_status: MavState::DEFAULT,
17195 mavlink_version: MINOR_MAVLINK_VERSION,
17196 };
17197 #[cfg(feature = "arbitrary")]
17198 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17199 use arbitrary::{Arbitrary, Unstructured};
17200 let mut buf = [0u8; 1024];
17201 rng.fill_bytes(&mut buf);
17202 let mut unstructured = Unstructured::new(&buf);
17203 Self::arbitrary(&mut unstructured).unwrap_or_default()
17204 }
17205}
17206impl Default for HEARTBEAT_DATA {
17207 fn default() -> Self {
17208 Self::DEFAULT.clone()
17209 }
17210}
17211impl MessageData for HEARTBEAT_DATA {
17212 type Message = MavMessage;
17213 const ID: u32 = 0u32;
17214 const NAME: &'static str = "HEARTBEAT";
17215 const EXTRA_CRC: u8 = 50u8;
17216 const ENCODED_LEN: usize = 9usize;
17217 fn deser(
17218 _version: MavlinkVersion,
17219 __input: &[u8],
17220 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17221 let avail_len = __input.len();
17222 let mut payload_buf = [0; Self::ENCODED_LEN];
17223 let mut buf = if avail_len < Self::ENCODED_LEN {
17224 payload_buf[0..avail_len].copy_from_slice(__input);
17225 Bytes::new(&payload_buf)
17226 } else {
17227 Bytes::new(__input)
17228 };
17229 let mut __struct = Self::default();
17230 __struct.custom_mode = buf.get_u32_le()?;
17231 let tmp = buf.get_u8()?;
17232 __struct.mavtype =
17233 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17234 enum_type: "MavType",
17235 value: tmp as u64,
17236 })?;
17237 let tmp = buf.get_u8()?;
17238 __struct.autopilot =
17239 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17240 enum_type: "MavAutopilot",
17241 value: tmp as u64,
17242 })?;
17243 let tmp = buf.get_u8()?;
17244 __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
17245 ::mavlink_core::error::ParserError::InvalidFlag {
17246 flag_type: "MavModeFlag",
17247 value: tmp as u64,
17248 },
17249 )?;
17250 let tmp = buf.get_u8()?;
17251 __struct.system_status =
17252 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17253 enum_type: "MavState",
17254 value: tmp as u64,
17255 })?;
17256 __struct.mavlink_version = buf.get_u8()?;
17257 Ok(__struct)
17258 }
17259 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17260 let mut __tmp = BytesMut::new(bytes);
17261 #[allow(clippy::absurd_extreme_comparisons)]
17262 #[allow(unused_comparisons)]
17263 if __tmp.remaining() < Self::ENCODED_LEN {
17264 panic!(
17265 "buffer is too small (need {} bytes, but got {})",
17266 Self::ENCODED_LEN,
17267 __tmp.remaining(),
17268 )
17269 }
17270 __tmp.put_u32_le(self.custom_mode);
17271 __tmp.put_u8(self.mavtype as u8);
17272 __tmp.put_u8(self.autopilot as u8);
17273 __tmp.put_u8(self.base_mode.bits() as u8);
17274 __tmp.put_u8(self.system_status as u8);
17275 __tmp.put_u8(self.mavlink_version);
17276 if matches!(version, MavlinkVersion::V2) {
17277 let len = __tmp.len();
17278 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17279 } else {
17280 __tmp.len()
17281 }
17282 }
17283}
17284#[doc = "The IMU readings in SI units in NED body frame."]
17285#[doc = ""]
17286#[doc = "ID: 105"]
17287#[derive(Debug, Clone, PartialEq)]
17288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17290#[cfg_attr(feature = "ts", derive(TS))]
17291#[cfg_attr(feature = "ts", ts(export))]
17292pub struct HIGHRES_IMU_DATA {
17293 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17294 pub time_usec: u64,
17295 #[doc = "X acceleration"]
17296 pub xacc: f32,
17297 #[doc = "Y acceleration"]
17298 pub yacc: f32,
17299 #[doc = "Z acceleration"]
17300 pub zacc: f32,
17301 #[doc = "Angular speed around X axis"]
17302 pub xgyro: f32,
17303 #[doc = "Angular speed around Y axis"]
17304 pub ygyro: f32,
17305 #[doc = "Angular speed around Z axis"]
17306 pub zgyro: f32,
17307 #[doc = "X Magnetic field"]
17308 pub xmag: f32,
17309 #[doc = "Y Magnetic field"]
17310 pub ymag: f32,
17311 #[doc = "Z Magnetic field"]
17312 pub zmag: f32,
17313 #[doc = "Absolute pressure"]
17314 pub abs_pressure: f32,
17315 #[doc = "Differential pressure"]
17316 pub diff_pressure: f32,
17317 #[doc = "Altitude calculated from pressure"]
17318 pub pressure_alt: f32,
17319 #[doc = "Temperature"]
17320 pub temperature: f32,
17321 #[doc = "Bitmap for fields that have updated since last message"]
17322 pub fields_updated: HighresImuUpdatedFlags,
17323 #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
17324 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17325 pub id: u8,
17326}
17327impl HIGHRES_IMU_DATA {
17328 pub const ENCODED_LEN: usize = 63usize;
17329 pub const DEFAULT: Self = Self {
17330 time_usec: 0_u64,
17331 xacc: 0.0_f32,
17332 yacc: 0.0_f32,
17333 zacc: 0.0_f32,
17334 xgyro: 0.0_f32,
17335 ygyro: 0.0_f32,
17336 zgyro: 0.0_f32,
17337 xmag: 0.0_f32,
17338 ymag: 0.0_f32,
17339 zmag: 0.0_f32,
17340 abs_pressure: 0.0_f32,
17341 diff_pressure: 0.0_f32,
17342 pressure_alt: 0.0_f32,
17343 temperature: 0.0_f32,
17344 fields_updated: HighresImuUpdatedFlags::DEFAULT,
17345 id: 0_u8,
17346 };
17347 #[cfg(feature = "arbitrary")]
17348 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17349 use arbitrary::{Arbitrary, Unstructured};
17350 let mut buf = [0u8; 1024];
17351 rng.fill_bytes(&mut buf);
17352 let mut unstructured = Unstructured::new(&buf);
17353 Self::arbitrary(&mut unstructured).unwrap_or_default()
17354 }
17355}
17356impl Default for HIGHRES_IMU_DATA {
17357 fn default() -> Self {
17358 Self::DEFAULT.clone()
17359 }
17360}
17361impl MessageData for HIGHRES_IMU_DATA {
17362 type Message = MavMessage;
17363 const ID: u32 = 105u32;
17364 const NAME: &'static str = "HIGHRES_IMU";
17365 const EXTRA_CRC: u8 = 93u8;
17366 const ENCODED_LEN: usize = 63usize;
17367 fn deser(
17368 _version: MavlinkVersion,
17369 __input: &[u8],
17370 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17371 let avail_len = __input.len();
17372 let mut payload_buf = [0; Self::ENCODED_LEN];
17373 let mut buf = if avail_len < Self::ENCODED_LEN {
17374 payload_buf[0..avail_len].copy_from_slice(__input);
17375 Bytes::new(&payload_buf)
17376 } else {
17377 Bytes::new(__input)
17378 };
17379 let mut __struct = Self::default();
17380 __struct.time_usec = buf.get_u64_le()?;
17381 __struct.xacc = buf.get_f32_le()?;
17382 __struct.yacc = buf.get_f32_le()?;
17383 __struct.zacc = buf.get_f32_le()?;
17384 __struct.xgyro = buf.get_f32_le()?;
17385 __struct.ygyro = buf.get_f32_le()?;
17386 __struct.zgyro = buf.get_f32_le()?;
17387 __struct.xmag = buf.get_f32_le()?;
17388 __struct.ymag = buf.get_f32_le()?;
17389 __struct.zmag = buf.get_f32_le()?;
17390 __struct.abs_pressure = buf.get_f32_le()?;
17391 __struct.diff_pressure = buf.get_f32_le()?;
17392 __struct.pressure_alt = buf.get_f32_le()?;
17393 __struct.temperature = buf.get_f32_le()?;
17394 let tmp = buf.get_u16_le()?;
17395 __struct.fields_updated =
17396 HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
17397 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17398 flag_type: "HighresImuUpdatedFlags",
17399 value: tmp as u64,
17400 })?;
17401 __struct.id = buf.get_u8()?;
17402 Ok(__struct)
17403 }
17404 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17405 let mut __tmp = BytesMut::new(bytes);
17406 #[allow(clippy::absurd_extreme_comparisons)]
17407 #[allow(unused_comparisons)]
17408 if __tmp.remaining() < Self::ENCODED_LEN {
17409 panic!(
17410 "buffer is too small (need {} bytes, but got {})",
17411 Self::ENCODED_LEN,
17412 __tmp.remaining(),
17413 )
17414 }
17415 __tmp.put_u64_le(self.time_usec);
17416 __tmp.put_f32_le(self.xacc);
17417 __tmp.put_f32_le(self.yacc);
17418 __tmp.put_f32_le(self.zacc);
17419 __tmp.put_f32_le(self.xgyro);
17420 __tmp.put_f32_le(self.ygyro);
17421 __tmp.put_f32_le(self.zgyro);
17422 __tmp.put_f32_le(self.xmag);
17423 __tmp.put_f32_le(self.ymag);
17424 __tmp.put_f32_le(self.zmag);
17425 __tmp.put_f32_le(self.abs_pressure);
17426 __tmp.put_f32_le(self.diff_pressure);
17427 __tmp.put_f32_le(self.pressure_alt);
17428 __tmp.put_f32_le(self.temperature);
17429 __tmp.put_u16_le(self.fields_updated.bits() as u16);
17430 if matches!(version, MavlinkVersion::V2) {
17431 __tmp.put_u8(self.id);
17432 let len = __tmp.len();
17433 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17434 } else {
17435 __tmp.len()
17436 }
17437 }
17438}
17439#[deprecated = " See `HIGH_LATENCY2` (Superseded since 2020-10)"]
17440#[doc = "Message appropriate for high latency connections like Iridium."]
17441#[doc = ""]
17442#[doc = "ID: 234"]
17443#[derive(Debug, Clone, PartialEq)]
17444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17446#[cfg_attr(feature = "ts", derive(TS))]
17447#[cfg_attr(feature = "ts", ts(export))]
17448pub struct HIGH_LATENCY_DATA {
17449 #[doc = "A bitfield for use for autopilot-specific flags."]
17450 pub custom_mode: u32,
17451 #[doc = "Latitude"]
17452 pub latitude: i32,
17453 #[doc = "Longitude"]
17454 pub longitude: i32,
17455 #[doc = "roll"]
17456 pub roll: i16,
17457 #[doc = "pitch"]
17458 pub pitch: i16,
17459 #[doc = "heading"]
17460 pub heading: u16,
17461 #[doc = "heading setpoint"]
17462 pub heading_sp: i16,
17463 #[doc = "Altitude above mean sea level"]
17464 pub altitude_amsl: i16,
17465 #[doc = "Altitude setpoint relative to the home position"]
17466 pub altitude_sp: i16,
17467 #[doc = "distance to target"]
17468 pub wp_distance: u16,
17469 #[doc = "Bitmap of enabled system modes."]
17470 pub base_mode: MavModeFlag,
17471 #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
17472 pub landed_state: MavLandedState,
17473 #[doc = "throttle (percentage)"]
17474 pub throttle: i8,
17475 #[doc = "airspeed"]
17476 pub airspeed: u8,
17477 #[doc = "airspeed setpoint"]
17478 pub airspeed_sp: u8,
17479 #[doc = "groundspeed"]
17480 pub groundspeed: u8,
17481 #[doc = "climb rate"]
17482 pub climb_rate: i8,
17483 #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
17484 pub gps_nsat: u8,
17485 #[doc = "GPS Fix type."]
17486 pub gps_fix_type: GpsFixType,
17487 #[doc = "Remaining battery (percentage)"]
17488 pub battery_remaining: u8,
17489 #[doc = "Autopilot temperature (degrees C)"]
17490 pub temperature: i8,
17491 #[doc = "Air temperature (degrees C) from airspeed sensor"]
17492 pub temperature_air: i8,
17493 #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
17494 pub failsafe: u8,
17495 #[doc = "current waypoint number"]
17496 pub wp_num: u8,
17497}
17498impl HIGH_LATENCY_DATA {
17499 pub const ENCODED_LEN: usize = 40usize;
17500 pub const DEFAULT: Self = Self {
17501 custom_mode: 0_u32,
17502 latitude: 0_i32,
17503 longitude: 0_i32,
17504 roll: 0_i16,
17505 pitch: 0_i16,
17506 heading: 0_u16,
17507 heading_sp: 0_i16,
17508 altitude_amsl: 0_i16,
17509 altitude_sp: 0_i16,
17510 wp_distance: 0_u16,
17511 base_mode: MavModeFlag::DEFAULT,
17512 landed_state: MavLandedState::DEFAULT,
17513 throttle: 0_i8,
17514 airspeed: 0_u8,
17515 airspeed_sp: 0_u8,
17516 groundspeed: 0_u8,
17517 climb_rate: 0_i8,
17518 gps_nsat: 0_u8,
17519 gps_fix_type: GpsFixType::DEFAULT,
17520 battery_remaining: 0_u8,
17521 temperature: 0_i8,
17522 temperature_air: 0_i8,
17523 failsafe: 0_u8,
17524 wp_num: 0_u8,
17525 };
17526 #[cfg(feature = "arbitrary")]
17527 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17528 use arbitrary::{Arbitrary, Unstructured};
17529 let mut buf = [0u8; 1024];
17530 rng.fill_bytes(&mut buf);
17531 let mut unstructured = Unstructured::new(&buf);
17532 Self::arbitrary(&mut unstructured).unwrap_or_default()
17533 }
17534}
17535impl Default for HIGH_LATENCY_DATA {
17536 fn default() -> Self {
17537 Self::DEFAULT.clone()
17538 }
17539}
17540impl MessageData for HIGH_LATENCY_DATA {
17541 type Message = MavMessage;
17542 const ID: u32 = 234u32;
17543 const NAME: &'static str = "HIGH_LATENCY";
17544 const EXTRA_CRC: u8 = 150u8;
17545 const ENCODED_LEN: usize = 40usize;
17546 fn deser(
17547 _version: MavlinkVersion,
17548 __input: &[u8],
17549 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17550 let avail_len = __input.len();
17551 let mut payload_buf = [0; Self::ENCODED_LEN];
17552 let mut buf = if avail_len < Self::ENCODED_LEN {
17553 payload_buf[0..avail_len].copy_from_slice(__input);
17554 Bytes::new(&payload_buf)
17555 } else {
17556 Bytes::new(__input)
17557 };
17558 let mut __struct = Self::default();
17559 __struct.custom_mode = buf.get_u32_le()?;
17560 __struct.latitude = buf.get_i32_le()?;
17561 __struct.longitude = buf.get_i32_le()?;
17562 __struct.roll = buf.get_i16_le()?;
17563 __struct.pitch = buf.get_i16_le()?;
17564 __struct.heading = buf.get_u16_le()?;
17565 __struct.heading_sp = buf.get_i16_le()?;
17566 __struct.altitude_amsl = buf.get_i16_le()?;
17567 __struct.altitude_sp = buf.get_i16_le()?;
17568 __struct.wp_distance = buf.get_u16_le()?;
17569 let tmp = buf.get_u8()?;
17570 __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
17571 ::mavlink_core::error::ParserError::InvalidFlag {
17572 flag_type: "MavModeFlag",
17573 value: tmp as u64,
17574 },
17575 )?;
17576 let tmp = buf.get_u8()?;
17577 __struct.landed_state =
17578 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17579 enum_type: "MavLandedState",
17580 value: tmp as u64,
17581 })?;
17582 __struct.throttle = buf.get_i8()?;
17583 __struct.airspeed = buf.get_u8()?;
17584 __struct.airspeed_sp = buf.get_u8()?;
17585 __struct.groundspeed = buf.get_u8()?;
17586 __struct.climb_rate = buf.get_i8()?;
17587 __struct.gps_nsat = buf.get_u8()?;
17588 let tmp = buf.get_u8()?;
17589 __struct.gps_fix_type =
17590 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17591 enum_type: "GpsFixType",
17592 value: tmp as u64,
17593 })?;
17594 __struct.battery_remaining = buf.get_u8()?;
17595 __struct.temperature = buf.get_i8()?;
17596 __struct.temperature_air = buf.get_i8()?;
17597 __struct.failsafe = buf.get_u8()?;
17598 __struct.wp_num = buf.get_u8()?;
17599 Ok(__struct)
17600 }
17601 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17602 let mut __tmp = BytesMut::new(bytes);
17603 #[allow(clippy::absurd_extreme_comparisons)]
17604 #[allow(unused_comparisons)]
17605 if __tmp.remaining() < Self::ENCODED_LEN {
17606 panic!(
17607 "buffer is too small (need {} bytes, but got {})",
17608 Self::ENCODED_LEN,
17609 __tmp.remaining(),
17610 )
17611 }
17612 __tmp.put_u32_le(self.custom_mode);
17613 __tmp.put_i32_le(self.latitude);
17614 __tmp.put_i32_le(self.longitude);
17615 __tmp.put_i16_le(self.roll);
17616 __tmp.put_i16_le(self.pitch);
17617 __tmp.put_u16_le(self.heading);
17618 __tmp.put_i16_le(self.heading_sp);
17619 __tmp.put_i16_le(self.altitude_amsl);
17620 __tmp.put_i16_le(self.altitude_sp);
17621 __tmp.put_u16_le(self.wp_distance);
17622 __tmp.put_u8(self.base_mode.bits() as u8);
17623 __tmp.put_u8(self.landed_state as u8);
17624 __tmp.put_i8(self.throttle);
17625 __tmp.put_u8(self.airspeed);
17626 __tmp.put_u8(self.airspeed_sp);
17627 __tmp.put_u8(self.groundspeed);
17628 __tmp.put_i8(self.climb_rate);
17629 __tmp.put_u8(self.gps_nsat);
17630 __tmp.put_u8(self.gps_fix_type as u8);
17631 __tmp.put_u8(self.battery_remaining);
17632 __tmp.put_i8(self.temperature);
17633 __tmp.put_i8(self.temperature_air);
17634 __tmp.put_u8(self.failsafe);
17635 __tmp.put_u8(self.wp_num);
17636 if matches!(version, MavlinkVersion::V2) {
17637 let len = __tmp.len();
17638 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17639 } else {
17640 __tmp.len()
17641 }
17642 }
17643}
17644#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
17645#[doc = ""]
17646#[doc = "ID: 235"]
17647#[derive(Debug, Clone, PartialEq)]
17648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17650#[cfg_attr(feature = "ts", derive(TS))]
17651#[cfg_attr(feature = "ts", ts(export))]
17652pub struct HIGH_LATENCY2_DATA {
17653 #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
17654 pub timestamp: u32,
17655 #[doc = "Latitude"]
17656 pub latitude: i32,
17657 #[doc = "Longitude"]
17658 pub longitude: i32,
17659 #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
17660 pub custom_mode: u16,
17661 #[doc = "Altitude above mean sea level"]
17662 pub altitude: i16,
17663 #[doc = "Altitude setpoint"]
17664 pub target_altitude: i16,
17665 #[doc = "Distance to target waypoint or position"]
17666 pub target_distance: u16,
17667 #[doc = "Current waypoint number"]
17668 pub wp_num: u16,
17669 #[doc = "Bitmap of failure flags."]
17670 pub failure_flags: HlFailureFlag,
17671 #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
17672 pub mavtype: MavType,
17673 #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
17674 pub autopilot: MavAutopilot,
17675 #[doc = "Heading"]
17676 pub heading: u8,
17677 #[doc = "Heading setpoint"]
17678 pub target_heading: u8,
17679 #[doc = "Throttle"]
17680 pub throttle: u8,
17681 #[doc = "Airspeed"]
17682 pub airspeed: u8,
17683 #[doc = "Airspeed setpoint"]
17684 pub airspeed_sp: u8,
17685 #[doc = "Groundspeed"]
17686 pub groundspeed: u8,
17687 #[doc = "Windspeed"]
17688 pub windspeed: u8,
17689 #[doc = "Wind heading"]
17690 pub wind_heading: u8,
17691 #[doc = "Maximum error horizontal position since last message"]
17692 pub eph: u8,
17693 #[doc = "Maximum error vertical position since last message"]
17694 pub epv: u8,
17695 #[doc = "Air temperature"]
17696 pub temperature_air: i8,
17697 #[doc = "Maximum climb rate magnitude since last message"]
17698 pub climb_rate: i8,
17699 #[doc = "Battery level (-1 if field not provided)."]
17700 pub battery: i8,
17701 #[doc = "Field for custom payload."]
17702 pub custom0: i8,
17703 #[doc = "Field for custom payload."]
17704 pub custom1: i8,
17705 #[doc = "Field for custom payload."]
17706 pub custom2: i8,
17707}
17708impl HIGH_LATENCY2_DATA {
17709 pub const ENCODED_LEN: usize = 42usize;
17710 pub const DEFAULT: Self = Self {
17711 timestamp: 0_u32,
17712 latitude: 0_i32,
17713 longitude: 0_i32,
17714 custom_mode: 0_u16,
17715 altitude: 0_i16,
17716 target_altitude: 0_i16,
17717 target_distance: 0_u16,
17718 wp_num: 0_u16,
17719 failure_flags: HlFailureFlag::DEFAULT,
17720 mavtype: MavType::DEFAULT,
17721 autopilot: MavAutopilot::DEFAULT,
17722 heading: 0_u8,
17723 target_heading: 0_u8,
17724 throttle: 0_u8,
17725 airspeed: 0_u8,
17726 airspeed_sp: 0_u8,
17727 groundspeed: 0_u8,
17728 windspeed: 0_u8,
17729 wind_heading: 0_u8,
17730 eph: 0_u8,
17731 epv: 0_u8,
17732 temperature_air: 0_i8,
17733 climb_rate: 0_i8,
17734 battery: 0_i8,
17735 custom0: 0_i8,
17736 custom1: 0_i8,
17737 custom2: 0_i8,
17738 };
17739 #[cfg(feature = "arbitrary")]
17740 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17741 use arbitrary::{Arbitrary, Unstructured};
17742 let mut buf = [0u8; 1024];
17743 rng.fill_bytes(&mut buf);
17744 let mut unstructured = Unstructured::new(&buf);
17745 Self::arbitrary(&mut unstructured).unwrap_or_default()
17746 }
17747}
17748impl Default for HIGH_LATENCY2_DATA {
17749 fn default() -> Self {
17750 Self::DEFAULT.clone()
17751 }
17752}
17753impl MessageData for HIGH_LATENCY2_DATA {
17754 type Message = MavMessage;
17755 const ID: u32 = 235u32;
17756 const NAME: &'static str = "HIGH_LATENCY2";
17757 const EXTRA_CRC: u8 = 179u8;
17758 const ENCODED_LEN: usize = 42usize;
17759 fn deser(
17760 _version: MavlinkVersion,
17761 __input: &[u8],
17762 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17763 let avail_len = __input.len();
17764 let mut payload_buf = [0; Self::ENCODED_LEN];
17765 let mut buf = if avail_len < Self::ENCODED_LEN {
17766 payload_buf[0..avail_len].copy_from_slice(__input);
17767 Bytes::new(&payload_buf)
17768 } else {
17769 Bytes::new(__input)
17770 };
17771 let mut __struct = Self::default();
17772 __struct.timestamp = buf.get_u32_le()?;
17773 __struct.latitude = buf.get_i32_le()?;
17774 __struct.longitude = buf.get_i32_le()?;
17775 __struct.custom_mode = buf.get_u16_le()?;
17776 __struct.altitude = buf.get_i16_le()?;
17777 __struct.target_altitude = buf.get_i16_le()?;
17778 __struct.target_distance = buf.get_u16_le()?;
17779 __struct.wp_num = buf.get_u16_le()?;
17780 let tmp = buf.get_u16_le()?;
17781 __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
17782 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17783 flag_type: "HlFailureFlag",
17784 value: tmp as u64,
17785 })?;
17786 let tmp = buf.get_u8()?;
17787 __struct.mavtype =
17788 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17789 enum_type: "MavType",
17790 value: tmp as u64,
17791 })?;
17792 let tmp = buf.get_u8()?;
17793 __struct.autopilot =
17794 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17795 enum_type: "MavAutopilot",
17796 value: tmp as u64,
17797 })?;
17798 __struct.heading = buf.get_u8()?;
17799 __struct.target_heading = buf.get_u8()?;
17800 __struct.throttle = buf.get_u8()?;
17801 __struct.airspeed = buf.get_u8()?;
17802 __struct.airspeed_sp = buf.get_u8()?;
17803 __struct.groundspeed = buf.get_u8()?;
17804 __struct.windspeed = buf.get_u8()?;
17805 __struct.wind_heading = buf.get_u8()?;
17806 __struct.eph = buf.get_u8()?;
17807 __struct.epv = buf.get_u8()?;
17808 __struct.temperature_air = buf.get_i8()?;
17809 __struct.climb_rate = buf.get_i8()?;
17810 __struct.battery = buf.get_i8()?;
17811 __struct.custom0 = buf.get_i8()?;
17812 __struct.custom1 = buf.get_i8()?;
17813 __struct.custom2 = buf.get_i8()?;
17814 Ok(__struct)
17815 }
17816 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17817 let mut __tmp = BytesMut::new(bytes);
17818 #[allow(clippy::absurd_extreme_comparisons)]
17819 #[allow(unused_comparisons)]
17820 if __tmp.remaining() < Self::ENCODED_LEN {
17821 panic!(
17822 "buffer is too small (need {} bytes, but got {})",
17823 Self::ENCODED_LEN,
17824 __tmp.remaining(),
17825 )
17826 }
17827 __tmp.put_u32_le(self.timestamp);
17828 __tmp.put_i32_le(self.latitude);
17829 __tmp.put_i32_le(self.longitude);
17830 __tmp.put_u16_le(self.custom_mode);
17831 __tmp.put_i16_le(self.altitude);
17832 __tmp.put_i16_le(self.target_altitude);
17833 __tmp.put_u16_le(self.target_distance);
17834 __tmp.put_u16_le(self.wp_num);
17835 __tmp.put_u16_le(self.failure_flags.bits() as u16);
17836 __tmp.put_u8(self.mavtype as u8);
17837 __tmp.put_u8(self.autopilot as u8);
17838 __tmp.put_u8(self.heading);
17839 __tmp.put_u8(self.target_heading);
17840 __tmp.put_u8(self.throttle);
17841 __tmp.put_u8(self.airspeed);
17842 __tmp.put_u8(self.airspeed_sp);
17843 __tmp.put_u8(self.groundspeed);
17844 __tmp.put_u8(self.windspeed);
17845 __tmp.put_u8(self.wind_heading);
17846 __tmp.put_u8(self.eph);
17847 __tmp.put_u8(self.epv);
17848 __tmp.put_i8(self.temperature_air);
17849 __tmp.put_i8(self.climb_rate);
17850 __tmp.put_i8(self.battery);
17851 __tmp.put_i8(self.custom0);
17852 __tmp.put_i8(self.custom1);
17853 __tmp.put_i8(self.custom2);
17854 if matches!(version, MavlinkVersion::V2) {
17855 let len = __tmp.len();
17856 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17857 } else {
17858 __tmp.len()
17859 }
17860 }
17861}
17862#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
17863#[doc = ""]
17864#[doc = "ID: 93"]
17865#[derive(Debug, Clone, PartialEq)]
17866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17868#[cfg_attr(feature = "ts", derive(TS))]
17869#[cfg_attr(feature = "ts", ts(export))]
17870pub struct HIL_ACTUATOR_CONTROLS_DATA {
17871 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17872 pub time_usec: u64,
17873 #[doc = "Flags bitmask."]
17874 pub flags: HilActuatorControlsFlags,
17875 #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
17876 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17877 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17878 pub controls: [f32; 16],
17879 #[doc = "System mode. Includes arming state."]
17880 pub mode: MavModeFlag,
17881}
17882impl HIL_ACTUATOR_CONTROLS_DATA {
17883 pub const ENCODED_LEN: usize = 81usize;
17884 pub const DEFAULT: Self = Self {
17885 time_usec: 0_u64,
17886 flags: HilActuatorControlsFlags::DEFAULT,
17887 controls: [0.0_f32; 16usize],
17888 mode: MavModeFlag::DEFAULT,
17889 };
17890 #[cfg(feature = "arbitrary")]
17891 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17892 use arbitrary::{Arbitrary, Unstructured};
17893 let mut buf = [0u8; 1024];
17894 rng.fill_bytes(&mut buf);
17895 let mut unstructured = Unstructured::new(&buf);
17896 Self::arbitrary(&mut unstructured).unwrap_or_default()
17897 }
17898}
17899impl Default for HIL_ACTUATOR_CONTROLS_DATA {
17900 fn default() -> Self {
17901 Self::DEFAULT.clone()
17902 }
17903}
17904impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
17905 type Message = MavMessage;
17906 const ID: u32 = 93u32;
17907 const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
17908 const EXTRA_CRC: u8 = 47u8;
17909 const ENCODED_LEN: usize = 81usize;
17910 fn deser(
17911 _version: MavlinkVersion,
17912 __input: &[u8],
17913 ) -> Result<Self, ::mavlink_core::error::ParserError> {
17914 let avail_len = __input.len();
17915 let mut payload_buf = [0; Self::ENCODED_LEN];
17916 let mut buf = if avail_len < Self::ENCODED_LEN {
17917 payload_buf[0..avail_len].copy_from_slice(__input);
17918 Bytes::new(&payload_buf)
17919 } else {
17920 Bytes::new(__input)
17921 };
17922 let mut __struct = Self::default();
17923 __struct.time_usec = buf.get_u64_le()?;
17924 let tmp = buf.get_u64_le()?;
17925 __struct.flags =
17926 HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
17927 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17928 flag_type: "HilActuatorControlsFlags",
17929 value: tmp as u64,
17930 })?;
17931 for v in &mut __struct.controls {
17932 let val = buf.get_f32_le()?;
17933 *v = val;
17934 }
17935 let tmp = buf.get_u8()?;
17936 __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
17937 ::mavlink_core::error::ParserError::InvalidFlag {
17938 flag_type: "MavModeFlag",
17939 value: tmp as u64,
17940 },
17941 )?;
17942 Ok(__struct)
17943 }
17944 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17945 let mut __tmp = BytesMut::new(bytes);
17946 #[allow(clippy::absurd_extreme_comparisons)]
17947 #[allow(unused_comparisons)]
17948 if __tmp.remaining() < Self::ENCODED_LEN {
17949 panic!(
17950 "buffer is too small (need {} bytes, but got {})",
17951 Self::ENCODED_LEN,
17952 __tmp.remaining(),
17953 )
17954 }
17955 __tmp.put_u64_le(self.time_usec);
17956 __tmp.put_u64_le(self.flags.bits() as u64);
17957 for val in &self.controls {
17958 __tmp.put_f32_le(*val);
17959 }
17960 __tmp.put_u8(self.mode.bits() as u8);
17961 if matches!(version, MavlinkVersion::V2) {
17962 let len = __tmp.len();
17963 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17964 } else {
17965 __tmp.len()
17966 }
17967 }
17968}
17969#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
17970#[doc = ""]
17971#[doc = "ID: 91"]
17972#[derive(Debug, Clone, PartialEq)]
17973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17975#[cfg_attr(feature = "ts", derive(TS))]
17976#[cfg_attr(feature = "ts", ts(export))]
17977pub struct HIL_CONTROLS_DATA {
17978 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17979 pub time_usec: u64,
17980 #[doc = "Control output -1 .. 1"]
17981 pub roll_ailerons: f32,
17982 #[doc = "Control output -1 .. 1"]
17983 pub pitch_elevator: f32,
17984 #[doc = "Control output -1 .. 1"]
17985 pub yaw_rudder: f32,
17986 #[doc = "Throttle 0 .. 1"]
17987 pub throttle: f32,
17988 #[doc = "Aux 1, -1 .. 1"]
17989 pub aux1: f32,
17990 #[doc = "Aux 2, -1 .. 1"]
17991 pub aux2: f32,
17992 #[doc = "Aux 3, -1 .. 1"]
17993 pub aux3: f32,
17994 #[doc = "Aux 4, -1 .. 1"]
17995 pub aux4: f32,
17996 #[doc = "System mode."]
17997 pub mode: MavMode,
17998 #[doc = "Navigation mode (MAV_NAV_MODE)"]
17999 pub nav_mode: u8,
18000}
18001impl HIL_CONTROLS_DATA {
18002 pub const ENCODED_LEN: usize = 42usize;
18003 pub const DEFAULT: Self = Self {
18004 time_usec: 0_u64,
18005 roll_ailerons: 0.0_f32,
18006 pitch_elevator: 0.0_f32,
18007 yaw_rudder: 0.0_f32,
18008 throttle: 0.0_f32,
18009 aux1: 0.0_f32,
18010 aux2: 0.0_f32,
18011 aux3: 0.0_f32,
18012 aux4: 0.0_f32,
18013 mode: MavMode::DEFAULT,
18014 nav_mode: 0_u8,
18015 };
18016 #[cfg(feature = "arbitrary")]
18017 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18018 use arbitrary::{Arbitrary, Unstructured};
18019 let mut buf = [0u8; 1024];
18020 rng.fill_bytes(&mut buf);
18021 let mut unstructured = Unstructured::new(&buf);
18022 Self::arbitrary(&mut unstructured).unwrap_or_default()
18023 }
18024}
18025impl Default for HIL_CONTROLS_DATA {
18026 fn default() -> Self {
18027 Self::DEFAULT.clone()
18028 }
18029}
18030impl MessageData for HIL_CONTROLS_DATA {
18031 type Message = MavMessage;
18032 const ID: u32 = 91u32;
18033 const NAME: &'static str = "HIL_CONTROLS";
18034 const EXTRA_CRC: u8 = 63u8;
18035 const ENCODED_LEN: usize = 42usize;
18036 fn deser(
18037 _version: MavlinkVersion,
18038 __input: &[u8],
18039 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18040 let avail_len = __input.len();
18041 let mut payload_buf = [0; Self::ENCODED_LEN];
18042 let mut buf = if avail_len < Self::ENCODED_LEN {
18043 payload_buf[0..avail_len].copy_from_slice(__input);
18044 Bytes::new(&payload_buf)
18045 } else {
18046 Bytes::new(__input)
18047 };
18048 let mut __struct = Self::default();
18049 __struct.time_usec = buf.get_u64_le()?;
18050 __struct.roll_ailerons = buf.get_f32_le()?;
18051 __struct.pitch_elevator = buf.get_f32_le()?;
18052 __struct.yaw_rudder = buf.get_f32_le()?;
18053 __struct.throttle = buf.get_f32_le()?;
18054 __struct.aux1 = buf.get_f32_le()?;
18055 __struct.aux2 = buf.get_f32_le()?;
18056 __struct.aux3 = buf.get_f32_le()?;
18057 __struct.aux4 = buf.get_f32_le()?;
18058 let tmp = buf.get_u8()?;
18059 __struct.mode =
18060 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18061 enum_type: "MavMode",
18062 value: tmp as u64,
18063 })?;
18064 __struct.nav_mode = buf.get_u8()?;
18065 Ok(__struct)
18066 }
18067 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18068 let mut __tmp = BytesMut::new(bytes);
18069 #[allow(clippy::absurd_extreme_comparisons)]
18070 #[allow(unused_comparisons)]
18071 if __tmp.remaining() < Self::ENCODED_LEN {
18072 panic!(
18073 "buffer is too small (need {} bytes, but got {})",
18074 Self::ENCODED_LEN,
18075 __tmp.remaining(),
18076 )
18077 }
18078 __tmp.put_u64_le(self.time_usec);
18079 __tmp.put_f32_le(self.roll_ailerons);
18080 __tmp.put_f32_le(self.pitch_elevator);
18081 __tmp.put_f32_le(self.yaw_rudder);
18082 __tmp.put_f32_le(self.throttle);
18083 __tmp.put_f32_le(self.aux1);
18084 __tmp.put_f32_le(self.aux2);
18085 __tmp.put_f32_le(self.aux3);
18086 __tmp.put_f32_le(self.aux4);
18087 __tmp.put_u8(self.mode as u8);
18088 __tmp.put_u8(self.nav_mode);
18089 if matches!(version, MavlinkVersion::V2) {
18090 let len = __tmp.len();
18091 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18092 } else {
18093 __tmp.len()
18094 }
18095 }
18096}
18097#[doc = "The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
18098#[doc = ""]
18099#[doc = "ID: 113"]
18100#[derive(Debug, Clone, PartialEq)]
18101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18103#[cfg_attr(feature = "ts", derive(TS))]
18104#[cfg_attr(feature = "ts", ts(export))]
18105pub struct HIL_GPS_DATA {
18106 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18107 pub time_usec: u64,
18108 #[doc = "Latitude (WGS84)"]
18109 pub lat: i32,
18110 #[doc = "Longitude (WGS84)"]
18111 pub lon: i32,
18112 #[doc = "Altitude (MSL). Positive for up."]
18113 pub alt: i32,
18114 #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
18115 pub eph: u16,
18116 #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
18117 pub epv: u16,
18118 #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
18119 pub vel: u16,
18120 #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
18121 pub vn: i16,
18122 #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
18123 pub ve: i16,
18124 #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
18125 pub vd: i16,
18126 #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
18127 pub cog: u16,
18128 #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
18129 pub fix_type: u8,
18130 #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
18131 pub satellites_visible: u8,
18132 #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
18133 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18134 pub id: u8,
18135 #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
18136 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18137 pub yaw: u16,
18138}
18139impl HIL_GPS_DATA {
18140 pub const ENCODED_LEN: usize = 39usize;
18141 pub const DEFAULT: Self = Self {
18142 time_usec: 0_u64,
18143 lat: 0_i32,
18144 lon: 0_i32,
18145 alt: 0_i32,
18146 eph: 0_u16,
18147 epv: 0_u16,
18148 vel: 0_u16,
18149 vn: 0_i16,
18150 ve: 0_i16,
18151 vd: 0_i16,
18152 cog: 0_u16,
18153 fix_type: 0_u8,
18154 satellites_visible: 0_u8,
18155 id: 0_u8,
18156 yaw: 0_u16,
18157 };
18158 #[cfg(feature = "arbitrary")]
18159 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18160 use arbitrary::{Arbitrary, Unstructured};
18161 let mut buf = [0u8; 1024];
18162 rng.fill_bytes(&mut buf);
18163 let mut unstructured = Unstructured::new(&buf);
18164 Self::arbitrary(&mut unstructured).unwrap_or_default()
18165 }
18166}
18167impl Default for HIL_GPS_DATA {
18168 fn default() -> Self {
18169 Self::DEFAULT.clone()
18170 }
18171}
18172impl MessageData for HIL_GPS_DATA {
18173 type Message = MavMessage;
18174 const ID: u32 = 113u32;
18175 const NAME: &'static str = "HIL_GPS";
18176 const EXTRA_CRC: u8 = 124u8;
18177 const ENCODED_LEN: usize = 39usize;
18178 fn deser(
18179 _version: MavlinkVersion,
18180 __input: &[u8],
18181 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18182 let avail_len = __input.len();
18183 let mut payload_buf = [0; Self::ENCODED_LEN];
18184 let mut buf = if avail_len < Self::ENCODED_LEN {
18185 payload_buf[0..avail_len].copy_from_slice(__input);
18186 Bytes::new(&payload_buf)
18187 } else {
18188 Bytes::new(__input)
18189 };
18190 let mut __struct = Self::default();
18191 __struct.time_usec = buf.get_u64_le()?;
18192 __struct.lat = buf.get_i32_le()?;
18193 __struct.lon = buf.get_i32_le()?;
18194 __struct.alt = buf.get_i32_le()?;
18195 __struct.eph = buf.get_u16_le()?;
18196 __struct.epv = buf.get_u16_le()?;
18197 __struct.vel = buf.get_u16_le()?;
18198 __struct.vn = buf.get_i16_le()?;
18199 __struct.ve = buf.get_i16_le()?;
18200 __struct.vd = buf.get_i16_le()?;
18201 __struct.cog = buf.get_u16_le()?;
18202 __struct.fix_type = buf.get_u8()?;
18203 __struct.satellites_visible = buf.get_u8()?;
18204 __struct.id = buf.get_u8()?;
18205 __struct.yaw = buf.get_u16_le()?;
18206 Ok(__struct)
18207 }
18208 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18209 let mut __tmp = BytesMut::new(bytes);
18210 #[allow(clippy::absurd_extreme_comparisons)]
18211 #[allow(unused_comparisons)]
18212 if __tmp.remaining() < Self::ENCODED_LEN {
18213 panic!(
18214 "buffer is too small (need {} bytes, but got {})",
18215 Self::ENCODED_LEN,
18216 __tmp.remaining(),
18217 )
18218 }
18219 __tmp.put_u64_le(self.time_usec);
18220 __tmp.put_i32_le(self.lat);
18221 __tmp.put_i32_le(self.lon);
18222 __tmp.put_i32_le(self.alt);
18223 __tmp.put_u16_le(self.eph);
18224 __tmp.put_u16_le(self.epv);
18225 __tmp.put_u16_le(self.vel);
18226 __tmp.put_i16_le(self.vn);
18227 __tmp.put_i16_le(self.ve);
18228 __tmp.put_i16_le(self.vd);
18229 __tmp.put_u16_le(self.cog);
18230 __tmp.put_u8(self.fix_type);
18231 __tmp.put_u8(self.satellites_visible);
18232 if matches!(version, MavlinkVersion::V2) {
18233 __tmp.put_u8(self.id);
18234 __tmp.put_u16_le(self.yaw);
18235 let len = __tmp.len();
18236 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18237 } else {
18238 __tmp.len()
18239 }
18240 }
18241}
18242#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
18243#[doc = ""]
18244#[doc = "ID: 114"]
18245#[derive(Debug, Clone, PartialEq)]
18246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18248#[cfg_attr(feature = "ts", derive(TS))]
18249#[cfg_attr(feature = "ts", ts(export))]
18250pub struct HIL_OPTICAL_FLOW_DATA {
18251 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18252 pub time_usec: u64,
18253 #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
18254 pub integration_time_us: u32,
18255 #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
18256 pub integrated_x: f32,
18257 #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
18258 pub integrated_y: f32,
18259 #[doc = "RH rotation around X axis"]
18260 pub integrated_xgyro: f32,
18261 #[doc = "RH rotation around Y axis"]
18262 pub integrated_ygyro: f32,
18263 #[doc = "RH rotation around Z axis"]
18264 pub integrated_zgyro: f32,
18265 #[doc = "Time since the distance was sampled."]
18266 pub time_delta_distance_us: u32,
18267 #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
18268 pub distance: f32,
18269 #[doc = "Temperature"]
18270 pub temperature: i16,
18271 #[doc = "Sensor ID"]
18272 pub sensor_id: u8,
18273 #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
18274 pub quality: u8,
18275}
18276impl HIL_OPTICAL_FLOW_DATA {
18277 pub const ENCODED_LEN: usize = 44usize;
18278 pub const DEFAULT: Self = Self {
18279 time_usec: 0_u64,
18280 integration_time_us: 0_u32,
18281 integrated_x: 0.0_f32,
18282 integrated_y: 0.0_f32,
18283 integrated_xgyro: 0.0_f32,
18284 integrated_ygyro: 0.0_f32,
18285 integrated_zgyro: 0.0_f32,
18286 time_delta_distance_us: 0_u32,
18287 distance: 0.0_f32,
18288 temperature: 0_i16,
18289 sensor_id: 0_u8,
18290 quality: 0_u8,
18291 };
18292 #[cfg(feature = "arbitrary")]
18293 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18294 use arbitrary::{Arbitrary, Unstructured};
18295 let mut buf = [0u8; 1024];
18296 rng.fill_bytes(&mut buf);
18297 let mut unstructured = Unstructured::new(&buf);
18298 Self::arbitrary(&mut unstructured).unwrap_or_default()
18299 }
18300}
18301impl Default for HIL_OPTICAL_FLOW_DATA {
18302 fn default() -> Self {
18303 Self::DEFAULT.clone()
18304 }
18305}
18306impl MessageData for HIL_OPTICAL_FLOW_DATA {
18307 type Message = MavMessage;
18308 const ID: u32 = 114u32;
18309 const NAME: &'static str = "HIL_OPTICAL_FLOW";
18310 const EXTRA_CRC: u8 = 237u8;
18311 const ENCODED_LEN: usize = 44usize;
18312 fn deser(
18313 _version: MavlinkVersion,
18314 __input: &[u8],
18315 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18316 let avail_len = __input.len();
18317 let mut payload_buf = [0; Self::ENCODED_LEN];
18318 let mut buf = if avail_len < Self::ENCODED_LEN {
18319 payload_buf[0..avail_len].copy_from_slice(__input);
18320 Bytes::new(&payload_buf)
18321 } else {
18322 Bytes::new(__input)
18323 };
18324 let mut __struct = Self::default();
18325 __struct.time_usec = buf.get_u64_le()?;
18326 __struct.integration_time_us = buf.get_u32_le()?;
18327 __struct.integrated_x = buf.get_f32_le()?;
18328 __struct.integrated_y = buf.get_f32_le()?;
18329 __struct.integrated_xgyro = buf.get_f32_le()?;
18330 __struct.integrated_ygyro = buf.get_f32_le()?;
18331 __struct.integrated_zgyro = buf.get_f32_le()?;
18332 __struct.time_delta_distance_us = buf.get_u32_le()?;
18333 __struct.distance = buf.get_f32_le()?;
18334 __struct.temperature = buf.get_i16_le()?;
18335 __struct.sensor_id = buf.get_u8()?;
18336 __struct.quality = buf.get_u8()?;
18337 Ok(__struct)
18338 }
18339 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18340 let mut __tmp = BytesMut::new(bytes);
18341 #[allow(clippy::absurd_extreme_comparisons)]
18342 #[allow(unused_comparisons)]
18343 if __tmp.remaining() < Self::ENCODED_LEN {
18344 panic!(
18345 "buffer is too small (need {} bytes, but got {})",
18346 Self::ENCODED_LEN,
18347 __tmp.remaining(),
18348 )
18349 }
18350 __tmp.put_u64_le(self.time_usec);
18351 __tmp.put_u32_le(self.integration_time_us);
18352 __tmp.put_f32_le(self.integrated_x);
18353 __tmp.put_f32_le(self.integrated_y);
18354 __tmp.put_f32_le(self.integrated_xgyro);
18355 __tmp.put_f32_le(self.integrated_ygyro);
18356 __tmp.put_f32_le(self.integrated_zgyro);
18357 __tmp.put_u32_le(self.time_delta_distance_us);
18358 __tmp.put_f32_le(self.distance);
18359 __tmp.put_i16_le(self.temperature);
18360 __tmp.put_u8(self.sensor_id);
18361 __tmp.put_u8(self.quality);
18362 if matches!(version, MavlinkVersion::V2) {
18363 let len = __tmp.len();
18364 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18365 } else {
18366 __tmp.len()
18367 }
18368 }
18369}
18370#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
18371#[doc = ""]
18372#[doc = "ID: 92"]
18373#[derive(Debug, Clone, PartialEq)]
18374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18376#[cfg_attr(feature = "ts", derive(TS))]
18377#[cfg_attr(feature = "ts", ts(export))]
18378pub struct HIL_RC_INPUTS_RAW_DATA {
18379 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18380 pub time_usec: u64,
18381 #[doc = "RC channel 1 value"]
18382 pub chan1_raw: u16,
18383 #[doc = "RC channel 2 value"]
18384 pub chan2_raw: u16,
18385 #[doc = "RC channel 3 value"]
18386 pub chan3_raw: u16,
18387 #[doc = "RC channel 4 value"]
18388 pub chan4_raw: u16,
18389 #[doc = "RC channel 5 value"]
18390 pub chan5_raw: u16,
18391 #[doc = "RC channel 6 value"]
18392 pub chan6_raw: u16,
18393 #[doc = "RC channel 7 value"]
18394 pub chan7_raw: u16,
18395 #[doc = "RC channel 8 value"]
18396 pub chan8_raw: u16,
18397 #[doc = "RC channel 9 value"]
18398 pub chan9_raw: u16,
18399 #[doc = "RC channel 10 value"]
18400 pub chan10_raw: u16,
18401 #[doc = "RC channel 11 value"]
18402 pub chan11_raw: u16,
18403 #[doc = "RC channel 12 value"]
18404 pub chan12_raw: u16,
18405 #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
18406 pub rssi: u8,
18407}
18408impl HIL_RC_INPUTS_RAW_DATA {
18409 pub const ENCODED_LEN: usize = 33usize;
18410 pub const DEFAULT: Self = Self {
18411 time_usec: 0_u64,
18412 chan1_raw: 0_u16,
18413 chan2_raw: 0_u16,
18414 chan3_raw: 0_u16,
18415 chan4_raw: 0_u16,
18416 chan5_raw: 0_u16,
18417 chan6_raw: 0_u16,
18418 chan7_raw: 0_u16,
18419 chan8_raw: 0_u16,
18420 chan9_raw: 0_u16,
18421 chan10_raw: 0_u16,
18422 chan11_raw: 0_u16,
18423 chan12_raw: 0_u16,
18424 rssi: 0_u8,
18425 };
18426 #[cfg(feature = "arbitrary")]
18427 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18428 use arbitrary::{Arbitrary, Unstructured};
18429 let mut buf = [0u8; 1024];
18430 rng.fill_bytes(&mut buf);
18431 let mut unstructured = Unstructured::new(&buf);
18432 Self::arbitrary(&mut unstructured).unwrap_or_default()
18433 }
18434}
18435impl Default for HIL_RC_INPUTS_RAW_DATA {
18436 fn default() -> Self {
18437 Self::DEFAULT.clone()
18438 }
18439}
18440impl MessageData for HIL_RC_INPUTS_RAW_DATA {
18441 type Message = MavMessage;
18442 const ID: u32 = 92u32;
18443 const NAME: &'static str = "HIL_RC_INPUTS_RAW";
18444 const EXTRA_CRC: u8 = 54u8;
18445 const ENCODED_LEN: usize = 33usize;
18446 fn deser(
18447 _version: MavlinkVersion,
18448 __input: &[u8],
18449 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18450 let avail_len = __input.len();
18451 let mut payload_buf = [0; Self::ENCODED_LEN];
18452 let mut buf = if avail_len < Self::ENCODED_LEN {
18453 payload_buf[0..avail_len].copy_from_slice(__input);
18454 Bytes::new(&payload_buf)
18455 } else {
18456 Bytes::new(__input)
18457 };
18458 let mut __struct = Self::default();
18459 __struct.time_usec = buf.get_u64_le()?;
18460 __struct.chan1_raw = buf.get_u16_le()?;
18461 __struct.chan2_raw = buf.get_u16_le()?;
18462 __struct.chan3_raw = buf.get_u16_le()?;
18463 __struct.chan4_raw = buf.get_u16_le()?;
18464 __struct.chan5_raw = buf.get_u16_le()?;
18465 __struct.chan6_raw = buf.get_u16_le()?;
18466 __struct.chan7_raw = buf.get_u16_le()?;
18467 __struct.chan8_raw = buf.get_u16_le()?;
18468 __struct.chan9_raw = buf.get_u16_le()?;
18469 __struct.chan10_raw = buf.get_u16_le()?;
18470 __struct.chan11_raw = buf.get_u16_le()?;
18471 __struct.chan12_raw = buf.get_u16_le()?;
18472 __struct.rssi = buf.get_u8()?;
18473 Ok(__struct)
18474 }
18475 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18476 let mut __tmp = BytesMut::new(bytes);
18477 #[allow(clippy::absurd_extreme_comparisons)]
18478 #[allow(unused_comparisons)]
18479 if __tmp.remaining() < Self::ENCODED_LEN {
18480 panic!(
18481 "buffer is too small (need {} bytes, but got {})",
18482 Self::ENCODED_LEN,
18483 __tmp.remaining(),
18484 )
18485 }
18486 __tmp.put_u64_le(self.time_usec);
18487 __tmp.put_u16_le(self.chan1_raw);
18488 __tmp.put_u16_le(self.chan2_raw);
18489 __tmp.put_u16_le(self.chan3_raw);
18490 __tmp.put_u16_le(self.chan4_raw);
18491 __tmp.put_u16_le(self.chan5_raw);
18492 __tmp.put_u16_le(self.chan6_raw);
18493 __tmp.put_u16_le(self.chan7_raw);
18494 __tmp.put_u16_le(self.chan8_raw);
18495 __tmp.put_u16_le(self.chan9_raw);
18496 __tmp.put_u16_le(self.chan10_raw);
18497 __tmp.put_u16_le(self.chan11_raw);
18498 __tmp.put_u16_le(self.chan12_raw);
18499 __tmp.put_u8(self.rssi);
18500 if matches!(version, MavlinkVersion::V2) {
18501 let len = __tmp.len();
18502 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18503 } else {
18504 __tmp.len()
18505 }
18506 }
18507}
18508#[doc = "The IMU readings in SI units in NED body frame."]
18509#[doc = ""]
18510#[doc = "ID: 107"]
18511#[derive(Debug, Clone, PartialEq)]
18512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18514#[cfg_attr(feature = "ts", derive(TS))]
18515#[cfg_attr(feature = "ts", ts(export))]
18516pub struct HIL_SENSOR_DATA {
18517 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18518 pub time_usec: u64,
18519 #[doc = "X acceleration"]
18520 pub xacc: f32,
18521 #[doc = "Y acceleration"]
18522 pub yacc: f32,
18523 #[doc = "Z acceleration"]
18524 pub zacc: f32,
18525 #[doc = "Angular speed around X axis in body frame"]
18526 pub xgyro: f32,
18527 #[doc = "Angular speed around Y axis in body frame"]
18528 pub ygyro: f32,
18529 #[doc = "Angular speed around Z axis in body frame"]
18530 pub zgyro: f32,
18531 #[doc = "X Magnetic field"]
18532 pub xmag: f32,
18533 #[doc = "Y Magnetic field"]
18534 pub ymag: f32,
18535 #[doc = "Z Magnetic field"]
18536 pub zmag: f32,
18537 #[doc = "Absolute pressure"]
18538 pub abs_pressure: f32,
18539 #[doc = "Differential pressure (airspeed)"]
18540 pub diff_pressure: f32,
18541 #[doc = "Altitude calculated from pressure"]
18542 pub pressure_alt: f32,
18543 #[doc = "Temperature"]
18544 pub temperature: f32,
18545 #[doc = "Bitmap for fields that have updated since last message"]
18546 pub fields_updated: HilSensorUpdatedFlags,
18547 #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
18548 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18549 pub id: u8,
18550}
18551impl HIL_SENSOR_DATA {
18552 pub const ENCODED_LEN: usize = 65usize;
18553 pub const DEFAULT: Self = Self {
18554 time_usec: 0_u64,
18555 xacc: 0.0_f32,
18556 yacc: 0.0_f32,
18557 zacc: 0.0_f32,
18558 xgyro: 0.0_f32,
18559 ygyro: 0.0_f32,
18560 zgyro: 0.0_f32,
18561 xmag: 0.0_f32,
18562 ymag: 0.0_f32,
18563 zmag: 0.0_f32,
18564 abs_pressure: 0.0_f32,
18565 diff_pressure: 0.0_f32,
18566 pressure_alt: 0.0_f32,
18567 temperature: 0.0_f32,
18568 fields_updated: HilSensorUpdatedFlags::DEFAULT,
18569 id: 0_u8,
18570 };
18571 #[cfg(feature = "arbitrary")]
18572 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18573 use arbitrary::{Arbitrary, Unstructured};
18574 let mut buf = [0u8; 1024];
18575 rng.fill_bytes(&mut buf);
18576 let mut unstructured = Unstructured::new(&buf);
18577 Self::arbitrary(&mut unstructured).unwrap_or_default()
18578 }
18579}
18580impl Default for HIL_SENSOR_DATA {
18581 fn default() -> Self {
18582 Self::DEFAULT.clone()
18583 }
18584}
18585impl MessageData for HIL_SENSOR_DATA {
18586 type Message = MavMessage;
18587 const ID: u32 = 107u32;
18588 const NAME: &'static str = "HIL_SENSOR";
18589 const EXTRA_CRC: u8 = 108u8;
18590 const ENCODED_LEN: usize = 65usize;
18591 fn deser(
18592 _version: MavlinkVersion,
18593 __input: &[u8],
18594 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18595 let avail_len = __input.len();
18596 let mut payload_buf = [0; Self::ENCODED_LEN];
18597 let mut buf = if avail_len < Self::ENCODED_LEN {
18598 payload_buf[0..avail_len].copy_from_slice(__input);
18599 Bytes::new(&payload_buf)
18600 } else {
18601 Bytes::new(__input)
18602 };
18603 let mut __struct = Self::default();
18604 __struct.time_usec = buf.get_u64_le()?;
18605 __struct.xacc = buf.get_f32_le()?;
18606 __struct.yacc = buf.get_f32_le()?;
18607 __struct.zacc = buf.get_f32_le()?;
18608 __struct.xgyro = buf.get_f32_le()?;
18609 __struct.ygyro = buf.get_f32_le()?;
18610 __struct.zgyro = buf.get_f32_le()?;
18611 __struct.xmag = buf.get_f32_le()?;
18612 __struct.ymag = buf.get_f32_le()?;
18613 __struct.zmag = buf.get_f32_le()?;
18614 __struct.abs_pressure = buf.get_f32_le()?;
18615 __struct.diff_pressure = buf.get_f32_le()?;
18616 __struct.pressure_alt = buf.get_f32_le()?;
18617 __struct.temperature = buf.get_f32_le()?;
18618 let tmp = buf.get_u32_le()?;
18619 __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
18620 tmp as <HilSensorUpdatedFlags as Flags>::Bits,
18621 )
18622 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18623 flag_type: "HilSensorUpdatedFlags",
18624 value: tmp as u64,
18625 })?;
18626 __struct.id = buf.get_u8()?;
18627 Ok(__struct)
18628 }
18629 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18630 let mut __tmp = BytesMut::new(bytes);
18631 #[allow(clippy::absurd_extreme_comparisons)]
18632 #[allow(unused_comparisons)]
18633 if __tmp.remaining() < Self::ENCODED_LEN {
18634 panic!(
18635 "buffer is too small (need {} bytes, but got {})",
18636 Self::ENCODED_LEN,
18637 __tmp.remaining(),
18638 )
18639 }
18640 __tmp.put_u64_le(self.time_usec);
18641 __tmp.put_f32_le(self.xacc);
18642 __tmp.put_f32_le(self.yacc);
18643 __tmp.put_f32_le(self.zacc);
18644 __tmp.put_f32_le(self.xgyro);
18645 __tmp.put_f32_le(self.ygyro);
18646 __tmp.put_f32_le(self.zgyro);
18647 __tmp.put_f32_le(self.xmag);
18648 __tmp.put_f32_le(self.ymag);
18649 __tmp.put_f32_le(self.zmag);
18650 __tmp.put_f32_le(self.abs_pressure);
18651 __tmp.put_f32_le(self.diff_pressure);
18652 __tmp.put_f32_le(self.pressure_alt);
18653 __tmp.put_f32_le(self.temperature);
18654 __tmp.put_u32_le(self.fields_updated.bits() as u32);
18655 if matches!(version, MavlinkVersion::V2) {
18656 __tmp.put_u8(self.id);
18657 let len = __tmp.len();
18658 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18659 } else {
18660 __tmp.len()
18661 }
18662 }
18663}
18664#[deprecated = " See `HIL_STATE_QUATERNION` (Superseded since 2013-07)"]
18665#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
18666#[doc = ""]
18667#[doc = "ID: 90"]
18668#[derive(Debug, Clone, PartialEq)]
18669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18671#[cfg_attr(feature = "ts", derive(TS))]
18672#[cfg_attr(feature = "ts", ts(export))]
18673pub struct HIL_STATE_DATA {
18674 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18675 pub time_usec: u64,
18676 #[doc = "Roll angle"]
18677 pub roll: f32,
18678 #[doc = "Pitch angle"]
18679 pub pitch: f32,
18680 #[doc = "Yaw angle"]
18681 pub yaw: f32,
18682 #[doc = "Body frame roll / phi angular speed"]
18683 pub rollspeed: f32,
18684 #[doc = "Body frame pitch / theta angular speed"]
18685 pub pitchspeed: f32,
18686 #[doc = "Body frame yaw / psi angular speed"]
18687 pub yawspeed: f32,
18688 #[doc = "Latitude"]
18689 pub lat: i32,
18690 #[doc = "Longitude"]
18691 pub lon: i32,
18692 #[doc = "Altitude"]
18693 pub alt: i32,
18694 #[doc = "Ground X Speed (Latitude)"]
18695 pub vx: i16,
18696 #[doc = "Ground Y Speed (Longitude)"]
18697 pub vy: i16,
18698 #[doc = "Ground Z Speed (Altitude)"]
18699 pub vz: i16,
18700 #[doc = "X acceleration"]
18701 pub xacc: i16,
18702 #[doc = "Y acceleration"]
18703 pub yacc: i16,
18704 #[doc = "Z acceleration"]
18705 pub zacc: i16,
18706}
18707impl HIL_STATE_DATA {
18708 pub const ENCODED_LEN: usize = 56usize;
18709 pub const DEFAULT: Self = Self {
18710 time_usec: 0_u64,
18711 roll: 0.0_f32,
18712 pitch: 0.0_f32,
18713 yaw: 0.0_f32,
18714 rollspeed: 0.0_f32,
18715 pitchspeed: 0.0_f32,
18716 yawspeed: 0.0_f32,
18717 lat: 0_i32,
18718 lon: 0_i32,
18719 alt: 0_i32,
18720 vx: 0_i16,
18721 vy: 0_i16,
18722 vz: 0_i16,
18723 xacc: 0_i16,
18724 yacc: 0_i16,
18725 zacc: 0_i16,
18726 };
18727 #[cfg(feature = "arbitrary")]
18728 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18729 use arbitrary::{Arbitrary, Unstructured};
18730 let mut buf = [0u8; 1024];
18731 rng.fill_bytes(&mut buf);
18732 let mut unstructured = Unstructured::new(&buf);
18733 Self::arbitrary(&mut unstructured).unwrap_or_default()
18734 }
18735}
18736impl Default for HIL_STATE_DATA {
18737 fn default() -> Self {
18738 Self::DEFAULT.clone()
18739 }
18740}
18741impl MessageData for HIL_STATE_DATA {
18742 type Message = MavMessage;
18743 const ID: u32 = 90u32;
18744 const NAME: &'static str = "HIL_STATE";
18745 const EXTRA_CRC: u8 = 183u8;
18746 const ENCODED_LEN: usize = 56usize;
18747 fn deser(
18748 _version: MavlinkVersion,
18749 __input: &[u8],
18750 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18751 let avail_len = __input.len();
18752 let mut payload_buf = [0; Self::ENCODED_LEN];
18753 let mut buf = if avail_len < Self::ENCODED_LEN {
18754 payload_buf[0..avail_len].copy_from_slice(__input);
18755 Bytes::new(&payload_buf)
18756 } else {
18757 Bytes::new(__input)
18758 };
18759 let mut __struct = Self::default();
18760 __struct.time_usec = buf.get_u64_le()?;
18761 __struct.roll = buf.get_f32_le()?;
18762 __struct.pitch = buf.get_f32_le()?;
18763 __struct.yaw = buf.get_f32_le()?;
18764 __struct.rollspeed = buf.get_f32_le()?;
18765 __struct.pitchspeed = buf.get_f32_le()?;
18766 __struct.yawspeed = buf.get_f32_le()?;
18767 __struct.lat = buf.get_i32_le()?;
18768 __struct.lon = buf.get_i32_le()?;
18769 __struct.alt = buf.get_i32_le()?;
18770 __struct.vx = buf.get_i16_le()?;
18771 __struct.vy = buf.get_i16_le()?;
18772 __struct.vz = buf.get_i16_le()?;
18773 __struct.xacc = buf.get_i16_le()?;
18774 __struct.yacc = buf.get_i16_le()?;
18775 __struct.zacc = buf.get_i16_le()?;
18776 Ok(__struct)
18777 }
18778 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18779 let mut __tmp = BytesMut::new(bytes);
18780 #[allow(clippy::absurd_extreme_comparisons)]
18781 #[allow(unused_comparisons)]
18782 if __tmp.remaining() < Self::ENCODED_LEN {
18783 panic!(
18784 "buffer is too small (need {} bytes, but got {})",
18785 Self::ENCODED_LEN,
18786 __tmp.remaining(),
18787 )
18788 }
18789 __tmp.put_u64_le(self.time_usec);
18790 __tmp.put_f32_le(self.roll);
18791 __tmp.put_f32_le(self.pitch);
18792 __tmp.put_f32_le(self.yaw);
18793 __tmp.put_f32_le(self.rollspeed);
18794 __tmp.put_f32_le(self.pitchspeed);
18795 __tmp.put_f32_le(self.yawspeed);
18796 __tmp.put_i32_le(self.lat);
18797 __tmp.put_i32_le(self.lon);
18798 __tmp.put_i32_le(self.alt);
18799 __tmp.put_i16_le(self.vx);
18800 __tmp.put_i16_le(self.vy);
18801 __tmp.put_i16_le(self.vz);
18802 __tmp.put_i16_le(self.xacc);
18803 __tmp.put_i16_le(self.yacc);
18804 __tmp.put_i16_le(self.zacc);
18805 if matches!(version, MavlinkVersion::V2) {
18806 let len = __tmp.len();
18807 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18808 } else {
18809 __tmp.len()
18810 }
18811 }
18812}
18813#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
18814#[doc = ""]
18815#[doc = "ID: 115"]
18816#[derive(Debug, Clone, PartialEq)]
18817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18819#[cfg_attr(feature = "ts", derive(TS))]
18820#[cfg_attr(feature = "ts", ts(export))]
18821pub struct HIL_STATE_QUATERNION_DATA {
18822 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18823 pub time_usec: u64,
18824 #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
18825 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18826 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18827 pub attitude_quaternion: [f32; 4],
18828 #[doc = "Body frame roll / phi angular speed"]
18829 pub rollspeed: f32,
18830 #[doc = "Body frame pitch / theta angular speed"]
18831 pub pitchspeed: f32,
18832 #[doc = "Body frame yaw / psi angular speed"]
18833 pub yawspeed: f32,
18834 #[doc = "Latitude"]
18835 pub lat: i32,
18836 #[doc = "Longitude"]
18837 pub lon: i32,
18838 #[doc = "Altitude"]
18839 pub alt: i32,
18840 #[doc = "Ground X Speed (Latitude)"]
18841 pub vx: i16,
18842 #[doc = "Ground Y Speed (Longitude)"]
18843 pub vy: i16,
18844 #[doc = "Ground Z Speed (Altitude)"]
18845 pub vz: i16,
18846 #[doc = "Indicated airspeed"]
18847 pub ind_airspeed: u16,
18848 #[doc = "True airspeed"]
18849 pub true_airspeed: u16,
18850 #[doc = "X acceleration"]
18851 pub xacc: i16,
18852 #[doc = "Y acceleration"]
18853 pub yacc: i16,
18854 #[doc = "Z acceleration"]
18855 pub zacc: i16,
18856}
18857impl HIL_STATE_QUATERNION_DATA {
18858 pub const ENCODED_LEN: usize = 64usize;
18859 pub const DEFAULT: Self = Self {
18860 time_usec: 0_u64,
18861 attitude_quaternion: [0.0_f32; 4usize],
18862 rollspeed: 0.0_f32,
18863 pitchspeed: 0.0_f32,
18864 yawspeed: 0.0_f32,
18865 lat: 0_i32,
18866 lon: 0_i32,
18867 alt: 0_i32,
18868 vx: 0_i16,
18869 vy: 0_i16,
18870 vz: 0_i16,
18871 ind_airspeed: 0_u16,
18872 true_airspeed: 0_u16,
18873 xacc: 0_i16,
18874 yacc: 0_i16,
18875 zacc: 0_i16,
18876 };
18877 #[cfg(feature = "arbitrary")]
18878 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18879 use arbitrary::{Arbitrary, Unstructured};
18880 let mut buf = [0u8; 1024];
18881 rng.fill_bytes(&mut buf);
18882 let mut unstructured = Unstructured::new(&buf);
18883 Self::arbitrary(&mut unstructured).unwrap_or_default()
18884 }
18885}
18886impl Default for HIL_STATE_QUATERNION_DATA {
18887 fn default() -> Self {
18888 Self::DEFAULT.clone()
18889 }
18890}
18891impl MessageData for HIL_STATE_QUATERNION_DATA {
18892 type Message = MavMessage;
18893 const ID: u32 = 115u32;
18894 const NAME: &'static str = "HIL_STATE_QUATERNION";
18895 const EXTRA_CRC: u8 = 4u8;
18896 const ENCODED_LEN: usize = 64usize;
18897 fn deser(
18898 _version: MavlinkVersion,
18899 __input: &[u8],
18900 ) -> Result<Self, ::mavlink_core::error::ParserError> {
18901 let avail_len = __input.len();
18902 let mut payload_buf = [0; Self::ENCODED_LEN];
18903 let mut buf = if avail_len < Self::ENCODED_LEN {
18904 payload_buf[0..avail_len].copy_from_slice(__input);
18905 Bytes::new(&payload_buf)
18906 } else {
18907 Bytes::new(__input)
18908 };
18909 let mut __struct = Self::default();
18910 __struct.time_usec = buf.get_u64_le()?;
18911 for v in &mut __struct.attitude_quaternion {
18912 let val = buf.get_f32_le()?;
18913 *v = val;
18914 }
18915 __struct.rollspeed = buf.get_f32_le()?;
18916 __struct.pitchspeed = buf.get_f32_le()?;
18917 __struct.yawspeed = buf.get_f32_le()?;
18918 __struct.lat = buf.get_i32_le()?;
18919 __struct.lon = buf.get_i32_le()?;
18920 __struct.alt = buf.get_i32_le()?;
18921 __struct.vx = buf.get_i16_le()?;
18922 __struct.vy = buf.get_i16_le()?;
18923 __struct.vz = buf.get_i16_le()?;
18924 __struct.ind_airspeed = buf.get_u16_le()?;
18925 __struct.true_airspeed = buf.get_u16_le()?;
18926 __struct.xacc = buf.get_i16_le()?;
18927 __struct.yacc = buf.get_i16_le()?;
18928 __struct.zacc = buf.get_i16_le()?;
18929 Ok(__struct)
18930 }
18931 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18932 let mut __tmp = BytesMut::new(bytes);
18933 #[allow(clippy::absurd_extreme_comparisons)]
18934 #[allow(unused_comparisons)]
18935 if __tmp.remaining() < Self::ENCODED_LEN {
18936 panic!(
18937 "buffer is too small (need {} bytes, but got {})",
18938 Self::ENCODED_LEN,
18939 __tmp.remaining(),
18940 )
18941 }
18942 __tmp.put_u64_le(self.time_usec);
18943 for val in &self.attitude_quaternion {
18944 __tmp.put_f32_le(*val);
18945 }
18946 __tmp.put_f32_le(self.rollspeed);
18947 __tmp.put_f32_le(self.pitchspeed);
18948 __tmp.put_f32_le(self.yawspeed);
18949 __tmp.put_i32_le(self.lat);
18950 __tmp.put_i32_le(self.lon);
18951 __tmp.put_i32_le(self.alt);
18952 __tmp.put_i16_le(self.vx);
18953 __tmp.put_i16_le(self.vy);
18954 __tmp.put_i16_le(self.vz);
18955 __tmp.put_u16_le(self.ind_airspeed);
18956 __tmp.put_u16_le(self.true_airspeed);
18957 __tmp.put_i16_le(self.xacc);
18958 __tmp.put_i16_le(self.yacc);
18959 __tmp.put_i16_le(self.zacc);
18960 if matches!(version, MavlinkVersion::V2) {
18961 let len = __tmp.len();
18962 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18963 } else {
18964 __tmp.len()
18965 }
18966 }
18967}
18968#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
18969#[doc = ""]
18970#[doc = "ID: 242"]
18971#[derive(Debug, Clone, PartialEq)]
18972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18974#[cfg_attr(feature = "ts", derive(TS))]
18975#[cfg_attr(feature = "ts", ts(export))]
18976pub struct HOME_POSITION_DATA {
18977 #[doc = "Latitude (WGS84)"]
18978 pub latitude: i32,
18979 #[doc = "Longitude (WGS84)"]
18980 pub longitude: i32,
18981 #[doc = "Altitude (MSL). Positive for up."]
18982 pub altitude: i32,
18983 #[doc = "Local X position of this position in the local coordinate frame (NED)"]
18984 pub x: f32,
18985 #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
18986 pub y: f32,
18987 #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
18988 pub z: f32,
18989 #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground. All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
18990 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18991 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18992 pub q: [f32; 4],
18993 #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
18994 pub approach_x: f32,
18995 #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
18996 pub approach_y: f32,
18997 #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
18998 pub approach_z: f32,
18999 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19000 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19001 pub time_usec: u64,
19002}
19003impl HOME_POSITION_DATA {
19004 pub const ENCODED_LEN: usize = 60usize;
19005 pub const DEFAULT: Self = Self {
19006 latitude: 0_i32,
19007 longitude: 0_i32,
19008 altitude: 0_i32,
19009 x: 0.0_f32,
19010 y: 0.0_f32,
19011 z: 0.0_f32,
19012 q: [0.0_f32; 4usize],
19013 approach_x: 0.0_f32,
19014 approach_y: 0.0_f32,
19015 approach_z: 0.0_f32,
19016 time_usec: 0_u64,
19017 };
19018 #[cfg(feature = "arbitrary")]
19019 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19020 use arbitrary::{Arbitrary, Unstructured};
19021 let mut buf = [0u8; 1024];
19022 rng.fill_bytes(&mut buf);
19023 let mut unstructured = Unstructured::new(&buf);
19024 Self::arbitrary(&mut unstructured).unwrap_or_default()
19025 }
19026}
19027impl Default for HOME_POSITION_DATA {
19028 fn default() -> Self {
19029 Self::DEFAULT.clone()
19030 }
19031}
19032impl MessageData for HOME_POSITION_DATA {
19033 type Message = MavMessage;
19034 const ID: u32 = 242u32;
19035 const NAME: &'static str = "HOME_POSITION";
19036 const EXTRA_CRC: u8 = 104u8;
19037 const ENCODED_LEN: usize = 60usize;
19038 fn deser(
19039 _version: MavlinkVersion,
19040 __input: &[u8],
19041 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19042 let avail_len = __input.len();
19043 let mut payload_buf = [0; Self::ENCODED_LEN];
19044 let mut buf = if avail_len < Self::ENCODED_LEN {
19045 payload_buf[0..avail_len].copy_from_slice(__input);
19046 Bytes::new(&payload_buf)
19047 } else {
19048 Bytes::new(__input)
19049 };
19050 let mut __struct = Self::default();
19051 __struct.latitude = buf.get_i32_le()?;
19052 __struct.longitude = buf.get_i32_le()?;
19053 __struct.altitude = buf.get_i32_le()?;
19054 __struct.x = buf.get_f32_le()?;
19055 __struct.y = buf.get_f32_le()?;
19056 __struct.z = buf.get_f32_le()?;
19057 for v in &mut __struct.q {
19058 let val = buf.get_f32_le()?;
19059 *v = val;
19060 }
19061 __struct.approach_x = buf.get_f32_le()?;
19062 __struct.approach_y = buf.get_f32_le()?;
19063 __struct.approach_z = buf.get_f32_le()?;
19064 __struct.time_usec = buf.get_u64_le()?;
19065 Ok(__struct)
19066 }
19067 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19068 let mut __tmp = BytesMut::new(bytes);
19069 #[allow(clippy::absurd_extreme_comparisons)]
19070 #[allow(unused_comparisons)]
19071 if __tmp.remaining() < Self::ENCODED_LEN {
19072 panic!(
19073 "buffer is too small (need {} bytes, but got {})",
19074 Self::ENCODED_LEN,
19075 __tmp.remaining(),
19076 )
19077 }
19078 __tmp.put_i32_le(self.latitude);
19079 __tmp.put_i32_le(self.longitude);
19080 __tmp.put_i32_le(self.altitude);
19081 __tmp.put_f32_le(self.x);
19082 __tmp.put_f32_le(self.y);
19083 __tmp.put_f32_le(self.z);
19084 for val in &self.q {
19085 __tmp.put_f32_le(*val);
19086 }
19087 __tmp.put_f32_le(self.approach_x);
19088 __tmp.put_f32_le(self.approach_y);
19089 __tmp.put_f32_le(self.approach_z);
19090 if matches!(version, MavlinkVersion::V2) {
19091 __tmp.put_u64_le(self.time_usec);
19092 let len = __tmp.len();
19093 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19094 } else {
19095 __tmp.len()
19096 }
19097 }
19098}
19099#[doc = "Temperature and humidity from hygrometer."]
19100#[doc = ""]
19101#[doc = "ID: 12920"]
19102#[derive(Debug, Clone, PartialEq)]
19103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19105#[cfg_attr(feature = "ts", derive(TS))]
19106#[cfg_attr(feature = "ts", ts(export))]
19107pub struct HYGROMETER_SENSOR_DATA {
19108 #[doc = "Temperature"]
19109 pub temperature: i16,
19110 #[doc = "Humidity"]
19111 pub humidity: u16,
19112 #[doc = "Hygrometer ID"]
19113 pub id: u8,
19114}
19115impl HYGROMETER_SENSOR_DATA {
19116 pub const ENCODED_LEN: usize = 5usize;
19117 pub const DEFAULT: Self = Self {
19118 temperature: 0_i16,
19119 humidity: 0_u16,
19120 id: 0_u8,
19121 };
19122 #[cfg(feature = "arbitrary")]
19123 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19124 use arbitrary::{Arbitrary, Unstructured};
19125 let mut buf = [0u8; 1024];
19126 rng.fill_bytes(&mut buf);
19127 let mut unstructured = Unstructured::new(&buf);
19128 Self::arbitrary(&mut unstructured).unwrap_or_default()
19129 }
19130}
19131impl Default for HYGROMETER_SENSOR_DATA {
19132 fn default() -> Self {
19133 Self::DEFAULT.clone()
19134 }
19135}
19136impl MessageData for HYGROMETER_SENSOR_DATA {
19137 type Message = MavMessage;
19138 const ID: u32 = 12920u32;
19139 const NAME: &'static str = "HYGROMETER_SENSOR";
19140 const EXTRA_CRC: u8 = 20u8;
19141 const ENCODED_LEN: usize = 5usize;
19142 fn deser(
19143 _version: MavlinkVersion,
19144 __input: &[u8],
19145 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19146 let avail_len = __input.len();
19147 let mut payload_buf = [0; Self::ENCODED_LEN];
19148 let mut buf = if avail_len < Self::ENCODED_LEN {
19149 payload_buf[0..avail_len].copy_from_slice(__input);
19150 Bytes::new(&payload_buf)
19151 } else {
19152 Bytes::new(__input)
19153 };
19154 let mut __struct = Self::default();
19155 __struct.temperature = buf.get_i16_le()?;
19156 __struct.humidity = buf.get_u16_le()?;
19157 __struct.id = buf.get_u8()?;
19158 Ok(__struct)
19159 }
19160 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19161 let mut __tmp = BytesMut::new(bytes);
19162 #[allow(clippy::absurd_extreme_comparisons)]
19163 #[allow(unused_comparisons)]
19164 if __tmp.remaining() < Self::ENCODED_LEN {
19165 panic!(
19166 "buffer is too small (need {} bytes, but got {})",
19167 Self::ENCODED_LEN,
19168 __tmp.remaining(),
19169 )
19170 }
19171 __tmp.put_i16_le(self.temperature);
19172 __tmp.put_u16_le(self.humidity);
19173 __tmp.put_u8(self.id);
19174 if matches!(version, MavlinkVersion::V2) {
19175 let len = __tmp.len();
19176 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19177 } else {
19178 __tmp.len()
19179 }
19180 }
19181}
19182#[doc = "Illuminator status."]
19183#[doc = ""]
19184#[doc = "ID: 440"]
19185#[derive(Debug, Clone, PartialEq)]
19186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19188#[cfg_attr(feature = "ts", derive(TS))]
19189#[cfg_attr(feature = "ts", ts(export))]
19190pub struct ILLUMINATOR_STATUS_DATA {
19191 #[doc = "Time since the start-up of the illuminator in ms"]
19192 pub uptime_ms: u32,
19193 #[doc = "Errors"]
19194 pub error_status: IlluminatorErrorFlags,
19195 #[doc = "Illuminator brightness"]
19196 pub brightness: f32,
19197 #[doc = "Illuminator strobing period in seconds"]
19198 pub strobe_period: f32,
19199 #[doc = "Illuminator strobing duty cycle"]
19200 pub strobe_duty_cycle: f32,
19201 #[doc = "Temperature in Celsius"]
19202 pub temp_c: f32,
19203 #[doc = "Minimum strobing period in seconds"]
19204 pub min_strobe_period: f32,
19205 #[doc = "Maximum strobing period in seconds"]
19206 pub max_strobe_period: f32,
19207 #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
19208 pub enable: u8,
19209 #[doc = "Supported illuminator modes"]
19210 pub mode_bitmask: IlluminatorMode,
19211 #[doc = "Illuminator mode"]
19212 pub mode: IlluminatorMode,
19213}
19214impl ILLUMINATOR_STATUS_DATA {
19215 pub const ENCODED_LEN: usize = 35usize;
19216 pub const DEFAULT: Self = Self {
19217 uptime_ms: 0_u32,
19218 error_status: IlluminatorErrorFlags::DEFAULT,
19219 brightness: 0.0_f32,
19220 strobe_period: 0.0_f32,
19221 strobe_duty_cycle: 0.0_f32,
19222 temp_c: 0.0_f32,
19223 min_strobe_period: 0.0_f32,
19224 max_strobe_period: 0.0_f32,
19225 enable: 0_u8,
19226 mode_bitmask: IlluminatorMode::DEFAULT,
19227 mode: IlluminatorMode::DEFAULT,
19228 };
19229 #[cfg(feature = "arbitrary")]
19230 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19231 use arbitrary::{Arbitrary, Unstructured};
19232 let mut buf = [0u8; 1024];
19233 rng.fill_bytes(&mut buf);
19234 let mut unstructured = Unstructured::new(&buf);
19235 Self::arbitrary(&mut unstructured).unwrap_or_default()
19236 }
19237}
19238impl Default for ILLUMINATOR_STATUS_DATA {
19239 fn default() -> Self {
19240 Self::DEFAULT.clone()
19241 }
19242}
19243impl MessageData for ILLUMINATOR_STATUS_DATA {
19244 type Message = MavMessage;
19245 const ID: u32 = 440u32;
19246 const NAME: &'static str = "ILLUMINATOR_STATUS";
19247 const EXTRA_CRC: u8 = 66u8;
19248 const ENCODED_LEN: usize = 35usize;
19249 fn deser(
19250 _version: MavlinkVersion,
19251 __input: &[u8],
19252 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19253 let avail_len = __input.len();
19254 let mut payload_buf = [0; Self::ENCODED_LEN];
19255 let mut buf = if avail_len < Self::ENCODED_LEN {
19256 payload_buf[0..avail_len].copy_from_slice(__input);
19257 Bytes::new(&payload_buf)
19258 } else {
19259 Bytes::new(__input)
19260 };
19261 let mut __struct = Self::default();
19262 __struct.uptime_ms = buf.get_u32_le()?;
19263 let tmp = buf.get_u32_le()?;
19264 __struct.error_status = IlluminatorErrorFlags::from_bits(
19265 tmp as <IlluminatorErrorFlags as Flags>::Bits,
19266 )
19267 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19268 flag_type: "IlluminatorErrorFlags",
19269 value: tmp as u64,
19270 })?;
19271 __struct.brightness = buf.get_f32_le()?;
19272 __struct.strobe_period = buf.get_f32_le()?;
19273 __struct.strobe_duty_cycle = buf.get_f32_le()?;
19274 __struct.temp_c = buf.get_f32_le()?;
19275 __struct.min_strobe_period = buf.get_f32_le()?;
19276 __struct.max_strobe_period = buf.get_f32_le()?;
19277 __struct.enable = buf.get_u8()?;
19278 let tmp = buf.get_u8()?;
19279 __struct.mode_bitmask =
19280 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19281 enum_type: "IlluminatorMode",
19282 value: tmp as u64,
19283 })?;
19284 let tmp = buf.get_u8()?;
19285 __struct.mode =
19286 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19287 enum_type: "IlluminatorMode",
19288 value: tmp as u64,
19289 })?;
19290 Ok(__struct)
19291 }
19292 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19293 let mut __tmp = BytesMut::new(bytes);
19294 #[allow(clippy::absurd_extreme_comparisons)]
19295 #[allow(unused_comparisons)]
19296 if __tmp.remaining() < Self::ENCODED_LEN {
19297 panic!(
19298 "buffer is too small (need {} bytes, but got {})",
19299 Self::ENCODED_LEN,
19300 __tmp.remaining(),
19301 )
19302 }
19303 __tmp.put_u32_le(self.uptime_ms);
19304 __tmp.put_u32_le(self.error_status.bits() as u32);
19305 __tmp.put_f32_le(self.brightness);
19306 __tmp.put_f32_le(self.strobe_period);
19307 __tmp.put_f32_le(self.strobe_duty_cycle);
19308 __tmp.put_f32_le(self.temp_c);
19309 __tmp.put_f32_le(self.min_strobe_period);
19310 __tmp.put_f32_le(self.max_strobe_period);
19311 __tmp.put_u8(self.enable);
19312 __tmp.put_u8(self.mode_bitmask as u8);
19313 __tmp.put_u8(self.mode as u8);
19314 if matches!(version, MavlinkVersion::V2) {
19315 let len = __tmp.len();
19316 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19317 } else {
19318 __tmp.len()
19319 }
19320 }
19321}
19322#[doc = "Status of the Iridium SBD link."]
19323#[doc = ""]
19324#[doc = "ID: 335"]
19325#[derive(Debug, Clone, PartialEq)]
19326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19328#[cfg_attr(feature = "ts", derive(TS))]
19329#[cfg_attr(feature = "ts", ts(export))]
19330pub struct ISBD_LINK_STATUS_DATA {
19331 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19332 pub timestamp: u64,
19333 #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19334 pub last_heartbeat: u64,
19335 #[doc = "Number of failed SBD sessions."]
19336 pub failed_sessions: u16,
19337 #[doc = "Number of successful SBD sessions."]
19338 pub successful_sessions: u16,
19339 #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
19340 pub signal_quality: u8,
19341 #[doc = "1: Ring call pending, 0: No call pending."]
19342 pub ring_pending: u8,
19343 #[doc = "1: Transmission session pending, 0: No transmission session pending."]
19344 pub tx_session_pending: u8,
19345 #[doc = "1: Receiving session pending, 0: No receiving session pending."]
19346 pub rx_session_pending: u8,
19347}
19348impl ISBD_LINK_STATUS_DATA {
19349 pub const ENCODED_LEN: usize = 24usize;
19350 pub const DEFAULT: Self = Self {
19351 timestamp: 0_u64,
19352 last_heartbeat: 0_u64,
19353 failed_sessions: 0_u16,
19354 successful_sessions: 0_u16,
19355 signal_quality: 0_u8,
19356 ring_pending: 0_u8,
19357 tx_session_pending: 0_u8,
19358 rx_session_pending: 0_u8,
19359 };
19360 #[cfg(feature = "arbitrary")]
19361 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19362 use arbitrary::{Arbitrary, Unstructured};
19363 let mut buf = [0u8; 1024];
19364 rng.fill_bytes(&mut buf);
19365 let mut unstructured = Unstructured::new(&buf);
19366 Self::arbitrary(&mut unstructured).unwrap_or_default()
19367 }
19368}
19369impl Default for ISBD_LINK_STATUS_DATA {
19370 fn default() -> Self {
19371 Self::DEFAULT.clone()
19372 }
19373}
19374impl MessageData for ISBD_LINK_STATUS_DATA {
19375 type Message = MavMessage;
19376 const ID: u32 = 335u32;
19377 const NAME: &'static str = "ISBD_LINK_STATUS";
19378 const EXTRA_CRC: u8 = 225u8;
19379 const ENCODED_LEN: usize = 24usize;
19380 fn deser(
19381 _version: MavlinkVersion,
19382 __input: &[u8],
19383 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19384 let avail_len = __input.len();
19385 let mut payload_buf = [0; Self::ENCODED_LEN];
19386 let mut buf = if avail_len < Self::ENCODED_LEN {
19387 payload_buf[0..avail_len].copy_from_slice(__input);
19388 Bytes::new(&payload_buf)
19389 } else {
19390 Bytes::new(__input)
19391 };
19392 let mut __struct = Self::default();
19393 __struct.timestamp = buf.get_u64_le()?;
19394 __struct.last_heartbeat = buf.get_u64_le()?;
19395 __struct.failed_sessions = buf.get_u16_le()?;
19396 __struct.successful_sessions = buf.get_u16_le()?;
19397 __struct.signal_quality = buf.get_u8()?;
19398 __struct.ring_pending = buf.get_u8()?;
19399 __struct.tx_session_pending = buf.get_u8()?;
19400 __struct.rx_session_pending = buf.get_u8()?;
19401 Ok(__struct)
19402 }
19403 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19404 let mut __tmp = BytesMut::new(bytes);
19405 #[allow(clippy::absurd_extreme_comparisons)]
19406 #[allow(unused_comparisons)]
19407 if __tmp.remaining() < Self::ENCODED_LEN {
19408 panic!(
19409 "buffer is too small (need {} bytes, but got {})",
19410 Self::ENCODED_LEN,
19411 __tmp.remaining(),
19412 )
19413 }
19414 __tmp.put_u64_le(self.timestamp);
19415 __tmp.put_u64_le(self.last_heartbeat);
19416 __tmp.put_u16_le(self.failed_sessions);
19417 __tmp.put_u16_le(self.successful_sessions);
19418 __tmp.put_u8(self.signal_quality);
19419 __tmp.put_u8(self.ring_pending);
19420 __tmp.put_u8(self.tx_session_pending);
19421 __tmp.put_u8(self.rx_session_pending);
19422 if matches!(version, MavlinkVersion::V2) {
19423 let len = __tmp.len();
19424 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19425 } else {
19426 __tmp.len()
19427 }
19428 }
19429}
19430#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
19431#[doc = ""]
19432#[doc = "ID: 149"]
19433#[derive(Debug, Clone, PartialEq)]
19434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19436#[cfg_attr(feature = "ts", derive(TS))]
19437#[cfg_attr(feature = "ts", ts(export))]
19438pub struct LANDING_TARGET_DATA {
19439 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19440 pub time_usec: u64,
19441 #[doc = "X-axis angular offset of the target from the center of the image"]
19442 pub angle_x: f32,
19443 #[doc = "Y-axis angular offset of the target from the center of the image"]
19444 pub angle_y: f32,
19445 #[doc = "Distance to the target from the vehicle"]
19446 pub distance: f32,
19447 #[doc = "Size of target along x-axis"]
19448 pub size_x: f32,
19449 #[doc = "Size of target along y-axis"]
19450 pub size_y: f32,
19451 #[doc = "The ID of the target if multiple targets are present"]
19452 pub target_num: u8,
19453 #[doc = "Coordinate frame used for following fields."]
19454 pub frame: MavFrame,
19455 #[doc = "X Position of the landing target in MAV_FRAME"]
19456 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19457 pub x: f32,
19458 #[doc = "Y Position of the landing target in MAV_FRAME"]
19459 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19460 pub y: f32,
19461 #[doc = "Z Position of the landing target in MAV_FRAME"]
19462 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19463 pub z: f32,
19464 #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
19465 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19466 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19467 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19468 pub q: [f32; 4],
19469 #[doc = "Type of landing target"]
19470 #[cfg_attr(feature = "serde", serde(default))]
19471 pub mavtype: LandingTargetType,
19472 #[doc = "Position fields (x, y, z, q, type) contain valid target position information (MAV_BOOL_FALSE: invalid values). Values not equal to 0 or 1 are invalid."]
19473 #[cfg_attr(feature = "serde", serde(default))]
19474 pub position_valid: MavBool,
19475}
19476impl LANDING_TARGET_DATA {
19477 pub const ENCODED_LEN: usize = 60usize;
19478 pub const DEFAULT: Self = Self {
19479 time_usec: 0_u64,
19480 angle_x: 0.0_f32,
19481 angle_y: 0.0_f32,
19482 distance: 0.0_f32,
19483 size_x: 0.0_f32,
19484 size_y: 0.0_f32,
19485 target_num: 0_u8,
19486 frame: MavFrame::DEFAULT,
19487 x: 0.0_f32,
19488 y: 0.0_f32,
19489 z: 0.0_f32,
19490 q: [0.0_f32; 4usize],
19491 mavtype: LandingTargetType::DEFAULT,
19492 position_valid: MavBool::DEFAULT,
19493 };
19494 #[cfg(feature = "arbitrary")]
19495 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19496 use arbitrary::{Arbitrary, Unstructured};
19497 let mut buf = [0u8; 1024];
19498 rng.fill_bytes(&mut buf);
19499 let mut unstructured = Unstructured::new(&buf);
19500 Self::arbitrary(&mut unstructured).unwrap_or_default()
19501 }
19502}
19503impl Default for LANDING_TARGET_DATA {
19504 fn default() -> Self {
19505 Self::DEFAULT.clone()
19506 }
19507}
19508impl MessageData for LANDING_TARGET_DATA {
19509 type Message = MavMessage;
19510 const ID: u32 = 149u32;
19511 const NAME: &'static str = "LANDING_TARGET";
19512 const EXTRA_CRC: u8 = 200u8;
19513 const ENCODED_LEN: usize = 60usize;
19514 fn deser(
19515 _version: MavlinkVersion,
19516 __input: &[u8],
19517 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19518 let avail_len = __input.len();
19519 let mut payload_buf = [0; Self::ENCODED_LEN];
19520 let mut buf = if avail_len < Self::ENCODED_LEN {
19521 payload_buf[0..avail_len].copy_from_slice(__input);
19522 Bytes::new(&payload_buf)
19523 } else {
19524 Bytes::new(__input)
19525 };
19526 let mut __struct = Self::default();
19527 __struct.time_usec = buf.get_u64_le()?;
19528 __struct.angle_x = buf.get_f32_le()?;
19529 __struct.angle_y = buf.get_f32_le()?;
19530 __struct.distance = buf.get_f32_le()?;
19531 __struct.size_x = buf.get_f32_le()?;
19532 __struct.size_y = buf.get_f32_le()?;
19533 __struct.target_num = buf.get_u8()?;
19534 let tmp = buf.get_u8()?;
19535 __struct.frame =
19536 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19537 enum_type: "MavFrame",
19538 value: tmp as u64,
19539 })?;
19540 __struct.x = buf.get_f32_le()?;
19541 __struct.y = buf.get_f32_le()?;
19542 __struct.z = buf.get_f32_le()?;
19543 for v in &mut __struct.q {
19544 let val = buf.get_f32_le()?;
19545 *v = val;
19546 }
19547 let tmp = buf.get_u8()?;
19548 __struct.mavtype =
19549 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19550 enum_type: "LandingTargetType",
19551 value: tmp as u64,
19552 })?;
19553 let tmp = buf.get_u8()?;
19554 __struct.position_valid = MavBool::from_bits(tmp as <MavBool as Flags>::Bits).ok_or(
19555 ::mavlink_core::error::ParserError::InvalidFlag {
19556 flag_type: "MavBool",
19557 value: tmp as u64,
19558 },
19559 )?;
19560 Ok(__struct)
19561 }
19562 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19563 let mut __tmp = BytesMut::new(bytes);
19564 #[allow(clippy::absurd_extreme_comparisons)]
19565 #[allow(unused_comparisons)]
19566 if __tmp.remaining() < Self::ENCODED_LEN {
19567 panic!(
19568 "buffer is too small (need {} bytes, but got {})",
19569 Self::ENCODED_LEN,
19570 __tmp.remaining(),
19571 )
19572 }
19573 __tmp.put_u64_le(self.time_usec);
19574 __tmp.put_f32_le(self.angle_x);
19575 __tmp.put_f32_le(self.angle_y);
19576 __tmp.put_f32_le(self.distance);
19577 __tmp.put_f32_le(self.size_x);
19578 __tmp.put_f32_le(self.size_y);
19579 __tmp.put_u8(self.target_num);
19580 __tmp.put_u8(self.frame as u8);
19581 if matches!(version, MavlinkVersion::V2) {
19582 __tmp.put_f32_le(self.x);
19583 __tmp.put_f32_le(self.y);
19584 __tmp.put_f32_le(self.z);
19585 for val in &self.q {
19586 __tmp.put_f32_le(*val);
19587 }
19588 __tmp.put_u8(self.mavtype as u8);
19589 __tmp.put_u8(self.position_valid.bits() as u8);
19590 let len = __tmp.len();
19591 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19592 } else {
19593 __tmp.len()
19594 }
19595 }
19596}
19597#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
19598#[doc = ""]
19599#[doc = "ID: 8"]
19600#[derive(Debug, Clone, PartialEq)]
19601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19603#[cfg_attr(feature = "ts", derive(TS))]
19604#[cfg_attr(feature = "ts", ts(export))]
19605pub struct LINK_NODE_STATUS_DATA {
19606 #[doc = "Timestamp (time since system boot)."]
19607 pub timestamp: u64,
19608 #[doc = "Transmit rate"]
19609 pub tx_rate: u32,
19610 #[doc = "Receive rate"]
19611 pub rx_rate: u32,
19612 #[doc = "Messages sent"]
19613 pub messages_sent: u32,
19614 #[doc = "Messages received (estimated from counting seq)"]
19615 pub messages_received: u32,
19616 #[doc = "Messages lost (estimated from counting seq)"]
19617 pub messages_lost: u32,
19618 #[doc = "Number of bytes that could not be parsed correctly."]
19619 pub rx_parse_err: u16,
19620 #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
19621 pub tx_overflows: u16,
19622 #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
19623 pub rx_overflows: u16,
19624 #[doc = "Remaining free transmit buffer space"]
19625 pub tx_buf: u8,
19626 #[doc = "Remaining free receive buffer space"]
19627 pub rx_buf: u8,
19628}
19629impl LINK_NODE_STATUS_DATA {
19630 pub const ENCODED_LEN: usize = 36usize;
19631 pub const DEFAULT: Self = Self {
19632 timestamp: 0_u64,
19633 tx_rate: 0_u32,
19634 rx_rate: 0_u32,
19635 messages_sent: 0_u32,
19636 messages_received: 0_u32,
19637 messages_lost: 0_u32,
19638 rx_parse_err: 0_u16,
19639 tx_overflows: 0_u16,
19640 rx_overflows: 0_u16,
19641 tx_buf: 0_u8,
19642 rx_buf: 0_u8,
19643 };
19644 #[cfg(feature = "arbitrary")]
19645 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19646 use arbitrary::{Arbitrary, Unstructured};
19647 let mut buf = [0u8; 1024];
19648 rng.fill_bytes(&mut buf);
19649 let mut unstructured = Unstructured::new(&buf);
19650 Self::arbitrary(&mut unstructured).unwrap_or_default()
19651 }
19652}
19653impl Default for LINK_NODE_STATUS_DATA {
19654 fn default() -> Self {
19655 Self::DEFAULT.clone()
19656 }
19657}
19658impl MessageData for LINK_NODE_STATUS_DATA {
19659 type Message = MavMessage;
19660 const ID: u32 = 8u32;
19661 const NAME: &'static str = "LINK_NODE_STATUS";
19662 const EXTRA_CRC: u8 = 117u8;
19663 const ENCODED_LEN: usize = 36usize;
19664 fn deser(
19665 _version: MavlinkVersion,
19666 __input: &[u8],
19667 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19668 let avail_len = __input.len();
19669 let mut payload_buf = [0; Self::ENCODED_LEN];
19670 let mut buf = if avail_len < Self::ENCODED_LEN {
19671 payload_buf[0..avail_len].copy_from_slice(__input);
19672 Bytes::new(&payload_buf)
19673 } else {
19674 Bytes::new(__input)
19675 };
19676 let mut __struct = Self::default();
19677 __struct.timestamp = buf.get_u64_le()?;
19678 __struct.tx_rate = buf.get_u32_le()?;
19679 __struct.rx_rate = buf.get_u32_le()?;
19680 __struct.messages_sent = buf.get_u32_le()?;
19681 __struct.messages_received = buf.get_u32_le()?;
19682 __struct.messages_lost = buf.get_u32_le()?;
19683 __struct.rx_parse_err = buf.get_u16_le()?;
19684 __struct.tx_overflows = buf.get_u16_le()?;
19685 __struct.rx_overflows = buf.get_u16_le()?;
19686 __struct.tx_buf = buf.get_u8()?;
19687 __struct.rx_buf = buf.get_u8()?;
19688 Ok(__struct)
19689 }
19690 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19691 let mut __tmp = BytesMut::new(bytes);
19692 #[allow(clippy::absurd_extreme_comparisons)]
19693 #[allow(unused_comparisons)]
19694 if __tmp.remaining() < Self::ENCODED_LEN {
19695 panic!(
19696 "buffer is too small (need {} bytes, but got {})",
19697 Self::ENCODED_LEN,
19698 __tmp.remaining(),
19699 )
19700 }
19701 __tmp.put_u64_le(self.timestamp);
19702 __tmp.put_u32_le(self.tx_rate);
19703 __tmp.put_u32_le(self.rx_rate);
19704 __tmp.put_u32_le(self.messages_sent);
19705 __tmp.put_u32_le(self.messages_received);
19706 __tmp.put_u32_le(self.messages_lost);
19707 __tmp.put_u16_le(self.rx_parse_err);
19708 __tmp.put_u16_le(self.tx_overflows);
19709 __tmp.put_u16_le(self.rx_overflows);
19710 __tmp.put_u8(self.tx_buf);
19711 __tmp.put_u8(self.rx_buf);
19712 if matches!(version, MavlinkVersion::V2) {
19713 let len = __tmp.len();
19714 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19715 } else {
19716 __tmp.len()
19717 }
19718 }
19719}
19720#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
19721#[doc = ""]
19722#[doc = "ID: 32"]
19723#[derive(Debug, Clone, PartialEq)]
19724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19726#[cfg_attr(feature = "ts", derive(TS))]
19727#[cfg_attr(feature = "ts", ts(export))]
19728pub struct LOCAL_POSITION_NED_DATA {
19729 #[doc = "Timestamp (time since system boot)."]
19730 pub time_boot_ms: u32,
19731 #[doc = "X Position"]
19732 pub x: f32,
19733 #[doc = "Y Position"]
19734 pub y: f32,
19735 #[doc = "Z Position"]
19736 pub z: f32,
19737 #[doc = "X Speed"]
19738 pub vx: f32,
19739 #[doc = "Y Speed"]
19740 pub vy: f32,
19741 #[doc = "Z Speed"]
19742 pub vz: f32,
19743}
19744impl LOCAL_POSITION_NED_DATA {
19745 pub const ENCODED_LEN: usize = 28usize;
19746 pub const DEFAULT: Self = Self {
19747 time_boot_ms: 0_u32,
19748 x: 0.0_f32,
19749 y: 0.0_f32,
19750 z: 0.0_f32,
19751 vx: 0.0_f32,
19752 vy: 0.0_f32,
19753 vz: 0.0_f32,
19754 };
19755 #[cfg(feature = "arbitrary")]
19756 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19757 use arbitrary::{Arbitrary, Unstructured};
19758 let mut buf = [0u8; 1024];
19759 rng.fill_bytes(&mut buf);
19760 let mut unstructured = Unstructured::new(&buf);
19761 Self::arbitrary(&mut unstructured).unwrap_or_default()
19762 }
19763}
19764impl Default for LOCAL_POSITION_NED_DATA {
19765 fn default() -> Self {
19766 Self::DEFAULT.clone()
19767 }
19768}
19769impl MessageData for LOCAL_POSITION_NED_DATA {
19770 type Message = MavMessage;
19771 const ID: u32 = 32u32;
19772 const NAME: &'static str = "LOCAL_POSITION_NED";
19773 const EXTRA_CRC: u8 = 185u8;
19774 const ENCODED_LEN: usize = 28usize;
19775 fn deser(
19776 _version: MavlinkVersion,
19777 __input: &[u8],
19778 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19779 let avail_len = __input.len();
19780 let mut payload_buf = [0; Self::ENCODED_LEN];
19781 let mut buf = if avail_len < Self::ENCODED_LEN {
19782 payload_buf[0..avail_len].copy_from_slice(__input);
19783 Bytes::new(&payload_buf)
19784 } else {
19785 Bytes::new(__input)
19786 };
19787 let mut __struct = Self::default();
19788 __struct.time_boot_ms = buf.get_u32_le()?;
19789 __struct.x = buf.get_f32_le()?;
19790 __struct.y = buf.get_f32_le()?;
19791 __struct.z = buf.get_f32_le()?;
19792 __struct.vx = buf.get_f32_le()?;
19793 __struct.vy = buf.get_f32_le()?;
19794 __struct.vz = buf.get_f32_le()?;
19795 Ok(__struct)
19796 }
19797 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19798 let mut __tmp = BytesMut::new(bytes);
19799 #[allow(clippy::absurd_extreme_comparisons)]
19800 #[allow(unused_comparisons)]
19801 if __tmp.remaining() < Self::ENCODED_LEN {
19802 panic!(
19803 "buffer is too small (need {} bytes, but got {})",
19804 Self::ENCODED_LEN,
19805 __tmp.remaining(),
19806 )
19807 }
19808 __tmp.put_u32_le(self.time_boot_ms);
19809 __tmp.put_f32_le(self.x);
19810 __tmp.put_f32_le(self.y);
19811 __tmp.put_f32_le(self.z);
19812 __tmp.put_f32_le(self.vx);
19813 __tmp.put_f32_le(self.vy);
19814 __tmp.put_f32_le(self.vz);
19815 if matches!(version, MavlinkVersion::V2) {
19816 let len = __tmp.len();
19817 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19818 } else {
19819 __tmp.len()
19820 }
19821 }
19822}
19823#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
19824#[doc = ""]
19825#[doc = "ID: 64"]
19826#[derive(Debug, Clone, PartialEq)]
19827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19829#[cfg_attr(feature = "ts", derive(TS))]
19830#[cfg_attr(feature = "ts", ts(export))]
19831pub struct LOCAL_POSITION_NED_COV_DATA {
19832 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19833 pub time_usec: u64,
19834 #[doc = "X Position"]
19835 pub x: f32,
19836 #[doc = "Y Position"]
19837 pub y: f32,
19838 #[doc = "Z Position"]
19839 pub z: f32,
19840 #[doc = "X Speed"]
19841 pub vx: f32,
19842 #[doc = "Y Speed"]
19843 pub vy: f32,
19844 #[doc = "Z Speed"]
19845 pub vz: f32,
19846 #[doc = "X Acceleration"]
19847 pub ax: f32,
19848 #[doc = "Y Acceleration"]
19849 pub ay: f32,
19850 #[doc = "Z Acceleration"]
19851 pub az: f32,
19852 #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
19853 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19854 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19855 pub covariance: [f32; 45],
19856 #[doc = "Class id of the estimator this estimate originated from."]
19857 pub estimator_type: MavEstimatorType,
19858}
19859impl LOCAL_POSITION_NED_COV_DATA {
19860 pub const ENCODED_LEN: usize = 225usize;
19861 pub const DEFAULT: Self = Self {
19862 time_usec: 0_u64,
19863 x: 0.0_f32,
19864 y: 0.0_f32,
19865 z: 0.0_f32,
19866 vx: 0.0_f32,
19867 vy: 0.0_f32,
19868 vz: 0.0_f32,
19869 ax: 0.0_f32,
19870 ay: 0.0_f32,
19871 az: 0.0_f32,
19872 covariance: [0.0_f32; 45usize],
19873 estimator_type: MavEstimatorType::DEFAULT,
19874 };
19875 #[cfg(feature = "arbitrary")]
19876 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19877 use arbitrary::{Arbitrary, Unstructured};
19878 let mut buf = [0u8; 1024];
19879 rng.fill_bytes(&mut buf);
19880 let mut unstructured = Unstructured::new(&buf);
19881 Self::arbitrary(&mut unstructured).unwrap_or_default()
19882 }
19883}
19884impl Default for LOCAL_POSITION_NED_COV_DATA {
19885 fn default() -> Self {
19886 Self::DEFAULT.clone()
19887 }
19888}
19889impl MessageData for LOCAL_POSITION_NED_COV_DATA {
19890 type Message = MavMessage;
19891 const ID: u32 = 64u32;
19892 const NAME: &'static str = "LOCAL_POSITION_NED_COV";
19893 const EXTRA_CRC: u8 = 191u8;
19894 const ENCODED_LEN: usize = 225usize;
19895 fn deser(
19896 _version: MavlinkVersion,
19897 __input: &[u8],
19898 ) -> Result<Self, ::mavlink_core::error::ParserError> {
19899 let avail_len = __input.len();
19900 let mut payload_buf = [0; Self::ENCODED_LEN];
19901 let mut buf = if avail_len < Self::ENCODED_LEN {
19902 payload_buf[0..avail_len].copy_from_slice(__input);
19903 Bytes::new(&payload_buf)
19904 } else {
19905 Bytes::new(__input)
19906 };
19907 let mut __struct = Self::default();
19908 __struct.time_usec = buf.get_u64_le()?;
19909 __struct.x = buf.get_f32_le()?;
19910 __struct.y = buf.get_f32_le()?;
19911 __struct.z = buf.get_f32_le()?;
19912 __struct.vx = buf.get_f32_le()?;
19913 __struct.vy = buf.get_f32_le()?;
19914 __struct.vz = buf.get_f32_le()?;
19915 __struct.ax = buf.get_f32_le()?;
19916 __struct.ay = buf.get_f32_le()?;
19917 __struct.az = buf.get_f32_le()?;
19918 for v in &mut __struct.covariance {
19919 let val = buf.get_f32_le()?;
19920 *v = val;
19921 }
19922 let tmp = buf.get_u8()?;
19923 __struct.estimator_type =
19924 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19925 enum_type: "MavEstimatorType",
19926 value: tmp as u64,
19927 })?;
19928 Ok(__struct)
19929 }
19930 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19931 let mut __tmp = BytesMut::new(bytes);
19932 #[allow(clippy::absurd_extreme_comparisons)]
19933 #[allow(unused_comparisons)]
19934 if __tmp.remaining() < Self::ENCODED_LEN {
19935 panic!(
19936 "buffer is too small (need {} bytes, but got {})",
19937 Self::ENCODED_LEN,
19938 __tmp.remaining(),
19939 )
19940 }
19941 __tmp.put_u64_le(self.time_usec);
19942 __tmp.put_f32_le(self.x);
19943 __tmp.put_f32_le(self.y);
19944 __tmp.put_f32_le(self.z);
19945 __tmp.put_f32_le(self.vx);
19946 __tmp.put_f32_le(self.vy);
19947 __tmp.put_f32_le(self.vz);
19948 __tmp.put_f32_le(self.ax);
19949 __tmp.put_f32_le(self.ay);
19950 __tmp.put_f32_le(self.az);
19951 for val in &self.covariance {
19952 __tmp.put_f32_le(*val);
19953 }
19954 __tmp.put_u8(self.estimator_type as u8);
19955 if matches!(version, MavlinkVersion::V2) {
19956 let len = __tmp.len();
19957 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19958 } else {
19959 __tmp.len()
19960 }
19961 }
19962}
19963#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
19964#[doc = ""]
19965#[doc = "ID: 89"]
19966#[derive(Debug, Clone, PartialEq)]
19967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19968#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19969#[cfg_attr(feature = "ts", derive(TS))]
19970#[cfg_attr(feature = "ts", ts(export))]
19971pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
19972 #[doc = "Timestamp (time since system boot)."]
19973 pub time_boot_ms: u32,
19974 #[doc = "X Position"]
19975 pub x: f32,
19976 #[doc = "Y Position"]
19977 pub y: f32,
19978 #[doc = "Z Position"]
19979 pub z: f32,
19980 #[doc = "Roll"]
19981 pub roll: f32,
19982 #[doc = "Pitch"]
19983 pub pitch: f32,
19984 #[doc = "Yaw"]
19985 pub yaw: f32,
19986}
19987impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
19988 pub const ENCODED_LEN: usize = 28usize;
19989 pub const DEFAULT: Self = Self {
19990 time_boot_ms: 0_u32,
19991 x: 0.0_f32,
19992 y: 0.0_f32,
19993 z: 0.0_f32,
19994 roll: 0.0_f32,
19995 pitch: 0.0_f32,
19996 yaw: 0.0_f32,
19997 };
19998 #[cfg(feature = "arbitrary")]
19999 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20000 use arbitrary::{Arbitrary, Unstructured};
20001 let mut buf = [0u8; 1024];
20002 rng.fill_bytes(&mut buf);
20003 let mut unstructured = Unstructured::new(&buf);
20004 Self::arbitrary(&mut unstructured).unwrap_or_default()
20005 }
20006}
20007impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
20008 fn default() -> Self {
20009 Self::DEFAULT.clone()
20010 }
20011}
20012impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
20013 type Message = MavMessage;
20014 const ID: u32 = 89u32;
20015 const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
20016 const EXTRA_CRC: u8 = 231u8;
20017 const ENCODED_LEN: usize = 28usize;
20018 fn deser(
20019 _version: MavlinkVersion,
20020 __input: &[u8],
20021 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20022 let avail_len = __input.len();
20023 let mut payload_buf = [0; Self::ENCODED_LEN];
20024 let mut buf = if avail_len < Self::ENCODED_LEN {
20025 payload_buf[0..avail_len].copy_from_slice(__input);
20026 Bytes::new(&payload_buf)
20027 } else {
20028 Bytes::new(__input)
20029 };
20030 let mut __struct = Self::default();
20031 __struct.time_boot_ms = buf.get_u32_le()?;
20032 __struct.x = buf.get_f32_le()?;
20033 __struct.y = buf.get_f32_le()?;
20034 __struct.z = buf.get_f32_le()?;
20035 __struct.roll = buf.get_f32_le()?;
20036 __struct.pitch = buf.get_f32_le()?;
20037 __struct.yaw = buf.get_f32_le()?;
20038 Ok(__struct)
20039 }
20040 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20041 let mut __tmp = BytesMut::new(bytes);
20042 #[allow(clippy::absurd_extreme_comparisons)]
20043 #[allow(unused_comparisons)]
20044 if __tmp.remaining() < Self::ENCODED_LEN {
20045 panic!(
20046 "buffer is too small (need {} bytes, but got {})",
20047 Self::ENCODED_LEN,
20048 __tmp.remaining(),
20049 )
20050 }
20051 __tmp.put_u32_le(self.time_boot_ms);
20052 __tmp.put_f32_le(self.x);
20053 __tmp.put_f32_le(self.y);
20054 __tmp.put_f32_le(self.z);
20055 __tmp.put_f32_le(self.roll);
20056 __tmp.put_f32_le(self.pitch);
20057 __tmp.put_f32_le(self.yaw);
20058 if matches!(version, MavlinkVersion::V2) {
20059 let len = __tmp.len();
20060 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20061 } else {
20062 __tmp.len()
20063 }
20064 }
20065}
20066#[doc = "An ack for a LOGGING_DATA_ACKED message."]
20067#[doc = ""]
20068#[doc = "ID: 268"]
20069#[derive(Debug, Clone, PartialEq)]
20070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20072#[cfg_attr(feature = "ts", derive(TS))]
20073#[cfg_attr(feature = "ts", ts(export))]
20074pub struct LOGGING_ACK_DATA {
20075 #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
20076 pub sequence: u16,
20077 #[doc = "system ID of the target"]
20078 pub target_system: u8,
20079 #[doc = "component ID of the target"]
20080 pub target_component: u8,
20081}
20082impl LOGGING_ACK_DATA {
20083 pub const ENCODED_LEN: usize = 4usize;
20084 pub const DEFAULT: Self = Self {
20085 sequence: 0_u16,
20086 target_system: 0_u8,
20087 target_component: 0_u8,
20088 };
20089 #[cfg(feature = "arbitrary")]
20090 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20091 use arbitrary::{Arbitrary, Unstructured};
20092 let mut buf = [0u8; 1024];
20093 rng.fill_bytes(&mut buf);
20094 let mut unstructured = Unstructured::new(&buf);
20095 Self::arbitrary(&mut unstructured).unwrap_or_default()
20096 }
20097}
20098impl Default for LOGGING_ACK_DATA {
20099 fn default() -> Self {
20100 Self::DEFAULT.clone()
20101 }
20102}
20103impl MessageData for LOGGING_ACK_DATA {
20104 type Message = MavMessage;
20105 const ID: u32 = 268u32;
20106 const NAME: &'static str = "LOGGING_ACK";
20107 const EXTRA_CRC: u8 = 14u8;
20108 const ENCODED_LEN: usize = 4usize;
20109 fn deser(
20110 _version: MavlinkVersion,
20111 __input: &[u8],
20112 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20113 let avail_len = __input.len();
20114 let mut payload_buf = [0; Self::ENCODED_LEN];
20115 let mut buf = if avail_len < Self::ENCODED_LEN {
20116 payload_buf[0..avail_len].copy_from_slice(__input);
20117 Bytes::new(&payload_buf)
20118 } else {
20119 Bytes::new(__input)
20120 };
20121 let mut __struct = Self::default();
20122 __struct.sequence = buf.get_u16_le()?;
20123 __struct.target_system = buf.get_u8()?;
20124 __struct.target_component = buf.get_u8()?;
20125 Ok(__struct)
20126 }
20127 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20128 let mut __tmp = BytesMut::new(bytes);
20129 #[allow(clippy::absurd_extreme_comparisons)]
20130 #[allow(unused_comparisons)]
20131 if __tmp.remaining() < Self::ENCODED_LEN {
20132 panic!(
20133 "buffer is too small (need {} bytes, but got {})",
20134 Self::ENCODED_LEN,
20135 __tmp.remaining(),
20136 )
20137 }
20138 __tmp.put_u16_le(self.sequence);
20139 __tmp.put_u8(self.target_system);
20140 __tmp.put_u8(self.target_component);
20141 if matches!(version, MavlinkVersion::V2) {
20142 let len = __tmp.len();
20143 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20144 } else {
20145 __tmp.len()
20146 }
20147 }
20148}
20149#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
20150#[doc = ""]
20151#[doc = "ID: 266"]
20152#[derive(Debug, Clone, PartialEq)]
20153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20155#[cfg_attr(feature = "ts", derive(TS))]
20156#[cfg_attr(feature = "ts", ts(export))]
20157pub struct LOGGING_DATA_DATA {
20158 #[doc = "sequence number (can wrap)"]
20159 pub sequence: u16,
20160 #[doc = "system ID of the target"]
20161 pub target_system: u8,
20162 #[doc = "component ID of the target"]
20163 pub target_component: u8,
20164 #[doc = "data length"]
20165 pub length: u8,
20166 #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
20167 pub first_message_offset: u8,
20168 #[doc = "logged data"]
20169 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20170 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20171 pub data: [u8; 249],
20172}
20173impl LOGGING_DATA_DATA {
20174 pub const ENCODED_LEN: usize = 255usize;
20175 pub const DEFAULT: Self = Self {
20176 sequence: 0_u16,
20177 target_system: 0_u8,
20178 target_component: 0_u8,
20179 length: 0_u8,
20180 first_message_offset: 0_u8,
20181 data: [0_u8; 249usize],
20182 };
20183 #[cfg(feature = "arbitrary")]
20184 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20185 use arbitrary::{Arbitrary, Unstructured};
20186 let mut buf = [0u8; 1024];
20187 rng.fill_bytes(&mut buf);
20188 let mut unstructured = Unstructured::new(&buf);
20189 Self::arbitrary(&mut unstructured).unwrap_or_default()
20190 }
20191}
20192impl Default for LOGGING_DATA_DATA {
20193 fn default() -> Self {
20194 Self::DEFAULT.clone()
20195 }
20196}
20197impl MessageData for LOGGING_DATA_DATA {
20198 type Message = MavMessage;
20199 const ID: u32 = 266u32;
20200 const NAME: &'static str = "LOGGING_DATA";
20201 const EXTRA_CRC: u8 = 193u8;
20202 const ENCODED_LEN: usize = 255usize;
20203 fn deser(
20204 _version: MavlinkVersion,
20205 __input: &[u8],
20206 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20207 let avail_len = __input.len();
20208 let mut payload_buf = [0; Self::ENCODED_LEN];
20209 let mut buf = if avail_len < Self::ENCODED_LEN {
20210 payload_buf[0..avail_len].copy_from_slice(__input);
20211 Bytes::new(&payload_buf)
20212 } else {
20213 Bytes::new(__input)
20214 };
20215 let mut __struct = Self::default();
20216 __struct.sequence = buf.get_u16_le()?;
20217 __struct.target_system = buf.get_u8()?;
20218 __struct.target_component = buf.get_u8()?;
20219 __struct.length = buf.get_u8()?;
20220 __struct.first_message_offset = buf.get_u8()?;
20221 for v in &mut __struct.data {
20222 let val = buf.get_u8()?;
20223 *v = val;
20224 }
20225 Ok(__struct)
20226 }
20227 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20228 let mut __tmp = BytesMut::new(bytes);
20229 #[allow(clippy::absurd_extreme_comparisons)]
20230 #[allow(unused_comparisons)]
20231 if __tmp.remaining() < Self::ENCODED_LEN {
20232 panic!(
20233 "buffer is too small (need {} bytes, but got {})",
20234 Self::ENCODED_LEN,
20235 __tmp.remaining(),
20236 )
20237 }
20238 __tmp.put_u16_le(self.sequence);
20239 __tmp.put_u8(self.target_system);
20240 __tmp.put_u8(self.target_component);
20241 __tmp.put_u8(self.length);
20242 __tmp.put_u8(self.first_message_offset);
20243 for val in &self.data {
20244 __tmp.put_u8(*val);
20245 }
20246 if matches!(version, MavlinkVersion::V2) {
20247 let len = __tmp.len();
20248 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20249 } else {
20250 __tmp.len()
20251 }
20252 }
20253}
20254#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
20255#[doc = ""]
20256#[doc = "ID: 267"]
20257#[derive(Debug, Clone, PartialEq)]
20258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20260#[cfg_attr(feature = "ts", derive(TS))]
20261#[cfg_attr(feature = "ts", ts(export))]
20262pub struct LOGGING_DATA_ACKED_DATA {
20263 #[doc = "sequence number (can wrap)"]
20264 pub sequence: u16,
20265 #[doc = "system ID of the target"]
20266 pub target_system: u8,
20267 #[doc = "component ID of the target"]
20268 pub target_component: u8,
20269 #[doc = "data length"]
20270 pub length: u8,
20271 #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
20272 pub first_message_offset: u8,
20273 #[doc = "logged data"]
20274 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20275 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20276 pub data: [u8; 249],
20277}
20278impl LOGGING_DATA_ACKED_DATA {
20279 pub const ENCODED_LEN: usize = 255usize;
20280 pub const DEFAULT: Self = Self {
20281 sequence: 0_u16,
20282 target_system: 0_u8,
20283 target_component: 0_u8,
20284 length: 0_u8,
20285 first_message_offset: 0_u8,
20286 data: [0_u8; 249usize],
20287 };
20288 #[cfg(feature = "arbitrary")]
20289 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20290 use arbitrary::{Arbitrary, Unstructured};
20291 let mut buf = [0u8; 1024];
20292 rng.fill_bytes(&mut buf);
20293 let mut unstructured = Unstructured::new(&buf);
20294 Self::arbitrary(&mut unstructured).unwrap_or_default()
20295 }
20296}
20297impl Default for LOGGING_DATA_ACKED_DATA {
20298 fn default() -> Self {
20299 Self::DEFAULT.clone()
20300 }
20301}
20302impl MessageData for LOGGING_DATA_ACKED_DATA {
20303 type Message = MavMessage;
20304 const ID: u32 = 267u32;
20305 const NAME: &'static str = "LOGGING_DATA_ACKED";
20306 const EXTRA_CRC: u8 = 35u8;
20307 const ENCODED_LEN: usize = 255usize;
20308 fn deser(
20309 _version: MavlinkVersion,
20310 __input: &[u8],
20311 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20312 let avail_len = __input.len();
20313 let mut payload_buf = [0; Self::ENCODED_LEN];
20314 let mut buf = if avail_len < Self::ENCODED_LEN {
20315 payload_buf[0..avail_len].copy_from_slice(__input);
20316 Bytes::new(&payload_buf)
20317 } else {
20318 Bytes::new(__input)
20319 };
20320 let mut __struct = Self::default();
20321 __struct.sequence = buf.get_u16_le()?;
20322 __struct.target_system = buf.get_u8()?;
20323 __struct.target_component = buf.get_u8()?;
20324 __struct.length = buf.get_u8()?;
20325 __struct.first_message_offset = buf.get_u8()?;
20326 for v in &mut __struct.data {
20327 let val = buf.get_u8()?;
20328 *v = val;
20329 }
20330 Ok(__struct)
20331 }
20332 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20333 let mut __tmp = BytesMut::new(bytes);
20334 #[allow(clippy::absurd_extreme_comparisons)]
20335 #[allow(unused_comparisons)]
20336 if __tmp.remaining() < Self::ENCODED_LEN {
20337 panic!(
20338 "buffer is too small (need {} bytes, but got {})",
20339 Self::ENCODED_LEN,
20340 __tmp.remaining(),
20341 )
20342 }
20343 __tmp.put_u16_le(self.sequence);
20344 __tmp.put_u8(self.target_system);
20345 __tmp.put_u8(self.target_component);
20346 __tmp.put_u8(self.length);
20347 __tmp.put_u8(self.first_message_offset);
20348 for val in &self.data {
20349 __tmp.put_u8(*val);
20350 }
20351 if matches!(version, MavlinkVersion::V2) {
20352 let len = __tmp.len();
20353 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20354 } else {
20355 __tmp.len()
20356 }
20357 }
20358}
20359#[doc = "Reply to LOG_REQUEST_DATA."]
20360#[doc = ""]
20361#[doc = "ID: 120"]
20362#[derive(Debug, Clone, PartialEq)]
20363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20365#[cfg_attr(feature = "ts", derive(TS))]
20366#[cfg_attr(feature = "ts", ts(export))]
20367pub struct LOG_DATA_DATA {
20368 #[doc = "Offset into the log"]
20369 pub ofs: u32,
20370 #[doc = "Log id (from LOG_ENTRY reply)"]
20371 pub id: u16,
20372 #[doc = "Number of bytes (zero for end of log)"]
20373 pub count: u8,
20374 #[doc = "log data"]
20375 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20376 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20377 pub data: [u8; 90],
20378}
20379impl LOG_DATA_DATA {
20380 pub const ENCODED_LEN: usize = 97usize;
20381 pub const DEFAULT: Self = Self {
20382 ofs: 0_u32,
20383 id: 0_u16,
20384 count: 0_u8,
20385 data: [0_u8; 90usize],
20386 };
20387 #[cfg(feature = "arbitrary")]
20388 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20389 use arbitrary::{Arbitrary, Unstructured};
20390 let mut buf = [0u8; 1024];
20391 rng.fill_bytes(&mut buf);
20392 let mut unstructured = Unstructured::new(&buf);
20393 Self::arbitrary(&mut unstructured).unwrap_or_default()
20394 }
20395}
20396impl Default for LOG_DATA_DATA {
20397 fn default() -> Self {
20398 Self::DEFAULT.clone()
20399 }
20400}
20401impl MessageData for LOG_DATA_DATA {
20402 type Message = MavMessage;
20403 const ID: u32 = 120u32;
20404 const NAME: &'static str = "LOG_DATA";
20405 const EXTRA_CRC: u8 = 134u8;
20406 const ENCODED_LEN: usize = 97usize;
20407 fn deser(
20408 _version: MavlinkVersion,
20409 __input: &[u8],
20410 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20411 let avail_len = __input.len();
20412 let mut payload_buf = [0; Self::ENCODED_LEN];
20413 let mut buf = if avail_len < Self::ENCODED_LEN {
20414 payload_buf[0..avail_len].copy_from_slice(__input);
20415 Bytes::new(&payload_buf)
20416 } else {
20417 Bytes::new(__input)
20418 };
20419 let mut __struct = Self::default();
20420 __struct.ofs = buf.get_u32_le()?;
20421 __struct.id = buf.get_u16_le()?;
20422 __struct.count = buf.get_u8()?;
20423 for v in &mut __struct.data {
20424 let val = buf.get_u8()?;
20425 *v = val;
20426 }
20427 Ok(__struct)
20428 }
20429 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20430 let mut __tmp = BytesMut::new(bytes);
20431 #[allow(clippy::absurd_extreme_comparisons)]
20432 #[allow(unused_comparisons)]
20433 if __tmp.remaining() < Self::ENCODED_LEN {
20434 panic!(
20435 "buffer is too small (need {} bytes, but got {})",
20436 Self::ENCODED_LEN,
20437 __tmp.remaining(),
20438 )
20439 }
20440 __tmp.put_u32_le(self.ofs);
20441 __tmp.put_u16_le(self.id);
20442 __tmp.put_u8(self.count);
20443 for val in &self.data {
20444 __tmp.put_u8(*val);
20445 }
20446 if matches!(version, MavlinkVersion::V2) {
20447 let len = __tmp.len();
20448 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20449 } else {
20450 __tmp.len()
20451 }
20452 }
20453}
20454#[doc = "Reply to LOG_REQUEST_LIST."]
20455#[doc = ""]
20456#[doc = "ID: 118"]
20457#[derive(Debug, Clone, PartialEq)]
20458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20460#[cfg_attr(feature = "ts", derive(TS))]
20461#[cfg_attr(feature = "ts", ts(export))]
20462pub struct LOG_ENTRY_DATA {
20463 #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
20464 pub time_utc: u32,
20465 #[doc = "Size of the log (may be approximate)"]
20466 pub size: u32,
20467 #[doc = "Log id"]
20468 pub id: u16,
20469 #[doc = "Total number of logs"]
20470 pub num_logs: u16,
20471 #[doc = "High log number"]
20472 pub last_log_num: u16,
20473}
20474impl LOG_ENTRY_DATA {
20475 pub const ENCODED_LEN: usize = 14usize;
20476 pub const DEFAULT: Self = Self {
20477 time_utc: 0_u32,
20478 size: 0_u32,
20479 id: 0_u16,
20480 num_logs: 0_u16,
20481 last_log_num: 0_u16,
20482 };
20483 #[cfg(feature = "arbitrary")]
20484 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20485 use arbitrary::{Arbitrary, Unstructured};
20486 let mut buf = [0u8; 1024];
20487 rng.fill_bytes(&mut buf);
20488 let mut unstructured = Unstructured::new(&buf);
20489 Self::arbitrary(&mut unstructured).unwrap_or_default()
20490 }
20491}
20492impl Default for LOG_ENTRY_DATA {
20493 fn default() -> Self {
20494 Self::DEFAULT.clone()
20495 }
20496}
20497impl MessageData for LOG_ENTRY_DATA {
20498 type Message = MavMessage;
20499 const ID: u32 = 118u32;
20500 const NAME: &'static str = "LOG_ENTRY";
20501 const EXTRA_CRC: u8 = 56u8;
20502 const ENCODED_LEN: usize = 14usize;
20503 fn deser(
20504 _version: MavlinkVersion,
20505 __input: &[u8],
20506 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20507 let avail_len = __input.len();
20508 let mut payload_buf = [0; Self::ENCODED_LEN];
20509 let mut buf = if avail_len < Self::ENCODED_LEN {
20510 payload_buf[0..avail_len].copy_from_slice(__input);
20511 Bytes::new(&payload_buf)
20512 } else {
20513 Bytes::new(__input)
20514 };
20515 let mut __struct = Self::default();
20516 __struct.time_utc = buf.get_u32_le()?;
20517 __struct.size = buf.get_u32_le()?;
20518 __struct.id = buf.get_u16_le()?;
20519 __struct.num_logs = buf.get_u16_le()?;
20520 __struct.last_log_num = buf.get_u16_le()?;
20521 Ok(__struct)
20522 }
20523 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20524 let mut __tmp = BytesMut::new(bytes);
20525 #[allow(clippy::absurd_extreme_comparisons)]
20526 #[allow(unused_comparisons)]
20527 if __tmp.remaining() < Self::ENCODED_LEN {
20528 panic!(
20529 "buffer is too small (need {} bytes, but got {})",
20530 Self::ENCODED_LEN,
20531 __tmp.remaining(),
20532 )
20533 }
20534 __tmp.put_u32_le(self.time_utc);
20535 __tmp.put_u32_le(self.size);
20536 __tmp.put_u16_le(self.id);
20537 __tmp.put_u16_le(self.num_logs);
20538 __tmp.put_u16_le(self.last_log_num);
20539 if matches!(version, MavlinkVersion::V2) {
20540 let len = __tmp.len();
20541 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20542 } else {
20543 __tmp.len()
20544 }
20545 }
20546}
20547#[doc = "Erase all logs."]
20548#[doc = ""]
20549#[doc = "ID: 121"]
20550#[derive(Debug, Clone, PartialEq)]
20551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20553#[cfg_attr(feature = "ts", derive(TS))]
20554#[cfg_attr(feature = "ts", ts(export))]
20555pub struct LOG_ERASE_DATA {
20556 #[doc = "System ID"]
20557 pub target_system: u8,
20558 #[doc = "Component ID"]
20559 pub target_component: u8,
20560}
20561impl LOG_ERASE_DATA {
20562 pub const ENCODED_LEN: usize = 2usize;
20563 pub const DEFAULT: Self = Self {
20564 target_system: 0_u8,
20565 target_component: 0_u8,
20566 };
20567 #[cfg(feature = "arbitrary")]
20568 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20569 use arbitrary::{Arbitrary, Unstructured};
20570 let mut buf = [0u8; 1024];
20571 rng.fill_bytes(&mut buf);
20572 let mut unstructured = Unstructured::new(&buf);
20573 Self::arbitrary(&mut unstructured).unwrap_or_default()
20574 }
20575}
20576impl Default for LOG_ERASE_DATA {
20577 fn default() -> Self {
20578 Self::DEFAULT.clone()
20579 }
20580}
20581impl MessageData for LOG_ERASE_DATA {
20582 type Message = MavMessage;
20583 const ID: u32 = 121u32;
20584 const NAME: &'static str = "LOG_ERASE";
20585 const EXTRA_CRC: u8 = 237u8;
20586 const ENCODED_LEN: usize = 2usize;
20587 fn deser(
20588 _version: MavlinkVersion,
20589 __input: &[u8],
20590 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20591 let avail_len = __input.len();
20592 let mut payload_buf = [0; Self::ENCODED_LEN];
20593 let mut buf = if avail_len < Self::ENCODED_LEN {
20594 payload_buf[0..avail_len].copy_from_slice(__input);
20595 Bytes::new(&payload_buf)
20596 } else {
20597 Bytes::new(__input)
20598 };
20599 let mut __struct = Self::default();
20600 __struct.target_system = buf.get_u8()?;
20601 __struct.target_component = buf.get_u8()?;
20602 Ok(__struct)
20603 }
20604 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20605 let mut __tmp = BytesMut::new(bytes);
20606 #[allow(clippy::absurd_extreme_comparisons)]
20607 #[allow(unused_comparisons)]
20608 if __tmp.remaining() < Self::ENCODED_LEN {
20609 panic!(
20610 "buffer is too small (need {} bytes, but got {})",
20611 Self::ENCODED_LEN,
20612 __tmp.remaining(),
20613 )
20614 }
20615 __tmp.put_u8(self.target_system);
20616 __tmp.put_u8(self.target_component);
20617 if matches!(version, MavlinkVersion::V2) {
20618 let len = __tmp.len();
20619 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20620 } else {
20621 __tmp.len()
20622 }
20623 }
20624}
20625#[doc = "Request a chunk of a log."]
20626#[doc = ""]
20627#[doc = "ID: 119"]
20628#[derive(Debug, Clone, PartialEq)]
20629#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20630#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20631#[cfg_attr(feature = "ts", derive(TS))]
20632#[cfg_attr(feature = "ts", ts(export))]
20633pub struct LOG_REQUEST_DATA_DATA {
20634 #[doc = "Offset into the log"]
20635 pub ofs: u32,
20636 #[doc = "Number of bytes"]
20637 pub count: u32,
20638 #[doc = "Log id (from LOG_ENTRY reply)"]
20639 pub id: u16,
20640 #[doc = "System ID"]
20641 pub target_system: u8,
20642 #[doc = "Component ID"]
20643 pub target_component: u8,
20644}
20645impl LOG_REQUEST_DATA_DATA {
20646 pub const ENCODED_LEN: usize = 12usize;
20647 pub const DEFAULT: Self = Self {
20648 ofs: 0_u32,
20649 count: 0_u32,
20650 id: 0_u16,
20651 target_system: 0_u8,
20652 target_component: 0_u8,
20653 };
20654 #[cfg(feature = "arbitrary")]
20655 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20656 use arbitrary::{Arbitrary, Unstructured};
20657 let mut buf = [0u8; 1024];
20658 rng.fill_bytes(&mut buf);
20659 let mut unstructured = Unstructured::new(&buf);
20660 Self::arbitrary(&mut unstructured).unwrap_or_default()
20661 }
20662}
20663impl Default for LOG_REQUEST_DATA_DATA {
20664 fn default() -> Self {
20665 Self::DEFAULT.clone()
20666 }
20667}
20668impl MessageData for LOG_REQUEST_DATA_DATA {
20669 type Message = MavMessage;
20670 const ID: u32 = 119u32;
20671 const NAME: &'static str = "LOG_REQUEST_DATA";
20672 const EXTRA_CRC: u8 = 116u8;
20673 const ENCODED_LEN: usize = 12usize;
20674 fn deser(
20675 _version: MavlinkVersion,
20676 __input: &[u8],
20677 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20678 let avail_len = __input.len();
20679 let mut payload_buf = [0; Self::ENCODED_LEN];
20680 let mut buf = if avail_len < Self::ENCODED_LEN {
20681 payload_buf[0..avail_len].copy_from_slice(__input);
20682 Bytes::new(&payload_buf)
20683 } else {
20684 Bytes::new(__input)
20685 };
20686 let mut __struct = Self::default();
20687 __struct.ofs = buf.get_u32_le()?;
20688 __struct.count = buf.get_u32_le()?;
20689 __struct.id = buf.get_u16_le()?;
20690 __struct.target_system = buf.get_u8()?;
20691 __struct.target_component = buf.get_u8()?;
20692 Ok(__struct)
20693 }
20694 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20695 let mut __tmp = BytesMut::new(bytes);
20696 #[allow(clippy::absurd_extreme_comparisons)]
20697 #[allow(unused_comparisons)]
20698 if __tmp.remaining() < Self::ENCODED_LEN {
20699 panic!(
20700 "buffer is too small (need {} bytes, but got {})",
20701 Self::ENCODED_LEN,
20702 __tmp.remaining(),
20703 )
20704 }
20705 __tmp.put_u32_le(self.ofs);
20706 __tmp.put_u32_le(self.count);
20707 __tmp.put_u16_le(self.id);
20708 __tmp.put_u8(self.target_system);
20709 __tmp.put_u8(self.target_component);
20710 if matches!(version, MavlinkVersion::V2) {
20711 let len = __tmp.len();
20712 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20713 } else {
20714 __tmp.len()
20715 }
20716 }
20717}
20718#[doc = "Stop log transfer and resume normal logging."]
20719#[doc = ""]
20720#[doc = "ID: 122"]
20721#[derive(Debug, Clone, PartialEq)]
20722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20724#[cfg_attr(feature = "ts", derive(TS))]
20725#[cfg_attr(feature = "ts", ts(export))]
20726pub struct LOG_REQUEST_END_DATA {
20727 #[doc = "System ID"]
20728 pub target_system: u8,
20729 #[doc = "Component ID"]
20730 pub target_component: u8,
20731}
20732impl LOG_REQUEST_END_DATA {
20733 pub const ENCODED_LEN: usize = 2usize;
20734 pub const DEFAULT: Self = Self {
20735 target_system: 0_u8,
20736 target_component: 0_u8,
20737 };
20738 #[cfg(feature = "arbitrary")]
20739 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20740 use arbitrary::{Arbitrary, Unstructured};
20741 let mut buf = [0u8; 1024];
20742 rng.fill_bytes(&mut buf);
20743 let mut unstructured = Unstructured::new(&buf);
20744 Self::arbitrary(&mut unstructured).unwrap_or_default()
20745 }
20746}
20747impl Default for LOG_REQUEST_END_DATA {
20748 fn default() -> Self {
20749 Self::DEFAULT.clone()
20750 }
20751}
20752impl MessageData for LOG_REQUEST_END_DATA {
20753 type Message = MavMessage;
20754 const ID: u32 = 122u32;
20755 const NAME: &'static str = "LOG_REQUEST_END";
20756 const EXTRA_CRC: u8 = 203u8;
20757 const ENCODED_LEN: usize = 2usize;
20758 fn deser(
20759 _version: MavlinkVersion,
20760 __input: &[u8],
20761 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20762 let avail_len = __input.len();
20763 let mut payload_buf = [0; Self::ENCODED_LEN];
20764 let mut buf = if avail_len < Self::ENCODED_LEN {
20765 payload_buf[0..avail_len].copy_from_slice(__input);
20766 Bytes::new(&payload_buf)
20767 } else {
20768 Bytes::new(__input)
20769 };
20770 let mut __struct = Self::default();
20771 __struct.target_system = buf.get_u8()?;
20772 __struct.target_component = buf.get_u8()?;
20773 Ok(__struct)
20774 }
20775 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20776 let mut __tmp = BytesMut::new(bytes);
20777 #[allow(clippy::absurd_extreme_comparisons)]
20778 #[allow(unused_comparisons)]
20779 if __tmp.remaining() < Self::ENCODED_LEN {
20780 panic!(
20781 "buffer is too small (need {} bytes, but got {})",
20782 Self::ENCODED_LEN,
20783 __tmp.remaining(),
20784 )
20785 }
20786 __tmp.put_u8(self.target_system);
20787 __tmp.put_u8(self.target_component);
20788 if matches!(version, MavlinkVersion::V2) {
20789 let len = __tmp.len();
20790 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20791 } else {
20792 __tmp.len()
20793 }
20794 }
20795}
20796#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
20797#[doc = ""]
20798#[doc = "ID: 117"]
20799#[derive(Debug, Clone, PartialEq)]
20800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20802#[cfg_attr(feature = "ts", derive(TS))]
20803#[cfg_attr(feature = "ts", ts(export))]
20804pub struct LOG_REQUEST_LIST_DATA {
20805 #[doc = "First log id (0 for first available)"]
20806 pub start: u16,
20807 #[doc = "Last log id (0xffff for last available)"]
20808 pub end: u16,
20809 #[doc = "System ID"]
20810 pub target_system: u8,
20811 #[doc = "Component ID"]
20812 pub target_component: u8,
20813}
20814impl LOG_REQUEST_LIST_DATA {
20815 pub const ENCODED_LEN: usize = 6usize;
20816 pub const DEFAULT: Self = Self {
20817 start: 0_u16,
20818 end: 0_u16,
20819 target_system: 0_u8,
20820 target_component: 0_u8,
20821 };
20822 #[cfg(feature = "arbitrary")]
20823 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20824 use arbitrary::{Arbitrary, Unstructured};
20825 let mut buf = [0u8; 1024];
20826 rng.fill_bytes(&mut buf);
20827 let mut unstructured = Unstructured::new(&buf);
20828 Self::arbitrary(&mut unstructured).unwrap_or_default()
20829 }
20830}
20831impl Default for LOG_REQUEST_LIST_DATA {
20832 fn default() -> Self {
20833 Self::DEFAULT.clone()
20834 }
20835}
20836impl MessageData for LOG_REQUEST_LIST_DATA {
20837 type Message = MavMessage;
20838 const ID: u32 = 117u32;
20839 const NAME: &'static str = "LOG_REQUEST_LIST";
20840 const EXTRA_CRC: u8 = 128u8;
20841 const ENCODED_LEN: usize = 6usize;
20842 fn deser(
20843 _version: MavlinkVersion,
20844 __input: &[u8],
20845 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20846 let avail_len = __input.len();
20847 let mut payload_buf = [0; Self::ENCODED_LEN];
20848 let mut buf = if avail_len < Self::ENCODED_LEN {
20849 payload_buf[0..avail_len].copy_from_slice(__input);
20850 Bytes::new(&payload_buf)
20851 } else {
20852 Bytes::new(__input)
20853 };
20854 let mut __struct = Self::default();
20855 __struct.start = buf.get_u16_le()?;
20856 __struct.end = buf.get_u16_le()?;
20857 __struct.target_system = buf.get_u8()?;
20858 __struct.target_component = buf.get_u8()?;
20859 Ok(__struct)
20860 }
20861 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20862 let mut __tmp = BytesMut::new(bytes);
20863 #[allow(clippy::absurd_extreme_comparisons)]
20864 #[allow(unused_comparisons)]
20865 if __tmp.remaining() < Self::ENCODED_LEN {
20866 panic!(
20867 "buffer is too small (need {} bytes, but got {})",
20868 Self::ENCODED_LEN,
20869 __tmp.remaining(),
20870 )
20871 }
20872 __tmp.put_u16_le(self.start);
20873 __tmp.put_u16_le(self.end);
20874 __tmp.put_u8(self.target_system);
20875 __tmp.put_u8(self.target_component);
20876 if matches!(version, MavlinkVersion::V2) {
20877 let len = __tmp.len();
20878 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20879 } else {
20880 __tmp.len()
20881 }
20882 }
20883}
20884#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
20885#[doc = ""]
20886#[doc = "ID: 192"]
20887#[derive(Debug, Clone, PartialEq)]
20888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20890#[cfg_attr(feature = "ts", derive(TS))]
20891#[cfg_attr(feature = "ts", ts(export))]
20892pub struct MAG_CAL_REPORT_DATA {
20893 #[doc = "RMS milligauss residuals."]
20894 pub fitness: f32,
20895 #[doc = "X offset."]
20896 pub ofs_x: f32,
20897 #[doc = "Y offset."]
20898 pub ofs_y: f32,
20899 #[doc = "Z offset."]
20900 pub ofs_z: f32,
20901 #[doc = "X diagonal (matrix 11)."]
20902 pub diag_x: f32,
20903 #[doc = "Y diagonal (matrix 22)."]
20904 pub diag_y: f32,
20905 #[doc = "Z diagonal (matrix 33)."]
20906 pub diag_z: f32,
20907 #[doc = "X off-diagonal (matrix 12 and 21)."]
20908 pub offdiag_x: f32,
20909 #[doc = "Y off-diagonal (matrix 13 and 31)."]
20910 pub offdiag_y: f32,
20911 #[doc = "Z off-diagonal (matrix 32 and 23)."]
20912 pub offdiag_z: f32,
20913 #[doc = "Compass being calibrated."]
20914 pub compass_id: u8,
20915 #[doc = "Bitmask of compasses being calibrated."]
20916 pub cal_mask: u8,
20917 #[doc = "Calibration Status."]
20918 pub cal_status: MagCalStatus,
20919 #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
20920 pub autosaved: u8,
20921 #[doc = "Confidence in orientation (higher is better)."]
20922 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20923 pub orientation_confidence: f32,
20924 #[doc = "orientation before calibration."]
20925 #[cfg_attr(feature = "serde", serde(default))]
20926 pub old_orientation: MavSensorOrientation,
20927 #[doc = "orientation after calibration."]
20928 #[cfg_attr(feature = "serde", serde(default))]
20929 pub new_orientation: MavSensorOrientation,
20930 #[doc = "field radius correction factor"]
20931 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20932 pub scale_factor: f32,
20933}
20934impl MAG_CAL_REPORT_DATA {
20935 pub const ENCODED_LEN: usize = 54usize;
20936 pub const DEFAULT: Self = Self {
20937 fitness: 0.0_f32,
20938 ofs_x: 0.0_f32,
20939 ofs_y: 0.0_f32,
20940 ofs_z: 0.0_f32,
20941 diag_x: 0.0_f32,
20942 diag_y: 0.0_f32,
20943 diag_z: 0.0_f32,
20944 offdiag_x: 0.0_f32,
20945 offdiag_y: 0.0_f32,
20946 offdiag_z: 0.0_f32,
20947 compass_id: 0_u8,
20948 cal_mask: 0_u8,
20949 cal_status: MagCalStatus::DEFAULT,
20950 autosaved: 0_u8,
20951 orientation_confidence: 0.0_f32,
20952 old_orientation: MavSensorOrientation::DEFAULT,
20953 new_orientation: MavSensorOrientation::DEFAULT,
20954 scale_factor: 0.0_f32,
20955 };
20956 #[cfg(feature = "arbitrary")]
20957 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20958 use arbitrary::{Arbitrary, Unstructured};
20959 let mut buf = [0u8; 1024];
20960 rng.fill_bytes(&mut buf);
20961 let mut unstructured = Unstructured::new(&buf);
20962 Self::arbitrary(&mut unstructured).unwrap_or_default()
20963 }
20964}
20965impl Default for MAG_CAL_REPORT_DATA {
20966 fn default() -> Self {
20967 Self::DEFAULT.clone()
20968 }
20969}
20970impl MessageData for MAG_CAL_REPORT_DATA {
20971 type Message = MavMessage;
20972 const ID: u32 = 192u32;
20973 const NAME: &'static str = "MAG_CAL_REPORT";
20974 const EXTRA_CRC: u8 = 36u8;
20975 const ENCODED_LEN: usize = 54usize;
20976 fn deser(
20977 _version: MavlinkVersion,
20978 __input: &[u8],
20979 ) -> Result<Self, ::mavlink_core::error::ParserError> {
20980 let avail_len = __input.len();
20981 let mut payload_buf = [0; Self::ENCODED_LEN];
20982 let mut buf = if avail_len < Self::ENCODED_LEN {
20983 payload_buf[0..avail_len].copy_from_slice(__input);
20984 Bytes::new(&payload_buf)
20985 } else {
20986 Bytes::new(__input)
20987 };
20988 let mut __struct = Self::default();
20989 __struct.fitness = buf.get_f32_le()?;
20990 __struct.ofs_x = buf.get_f32_le()?;
20991 __struct.ofs_y = buf.get_f32_le()?;
20992 __struct.ofs_z = buf.get_f32_le()?;
20993 __struct.diag_x = buf.get_f32_le()?;
20994 __struct.diag_y = buf.get_f32_le()?;
20995 __struct.diag_z = buf.get_f32_le()?;
20996 __struct.offdiag_x = buf.get_f32_le()?;
20997 __struct.offdiag_y = buf.get_f32_le()?;
20998 __struct.offdiag_z = buf.get_f32_le()?;
20999 __struct.compass_id = buf.get_u8()?;
21000 __struct.cal_mask = buf.get_u8()?;
21001 let tmp = buf.get_u8()?;
21002 __struct.cal_status =
21003 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21004 enum_type: "MagCalStatus",
21005 value: tmp as u64,
21006 })?;
21007 __struct.autosaved = buf.get_u8()?;
21008 __struct.orientation_confidence = buf.get_f32_le()?;
21009 let tmp = buf.get_u8()?;
21010 __struct.old_orientation =
21011 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21012 enum_type: "MavSensorOrientation",
21013 value: tmp as u64,
21014 })?;
21015 let tmp = buf.get_u8()?;
21016 __struct.new_orientation =
21017 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21018 enum_type: "MavSensorOrientation",
21019 value: tmp as u64,
21020 })?;
21021 __struct.scale_factor = buf.get_f32_le()?;
21022 Ok(__struct)
21023 }
21024 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21025 let mut __tmp = BytesMut::new(bytes);
21026 #[allow(clippy::absurd_extreme_comparisons)]
21027 #[allow(unused_comparisons)]
21028 if __tmp.remaining() < Self::ENCODED_LEN {
21029 panic!(
21030 "buffer is too small (need {} bytes, but got {})",
21031 Self::ENCODED_LEN,
21032 __tmp.remaining(),
21033 )
21034 }
21035 __tmp.put_f32_le(self.fitness);
21036 __tmp.put_f32_le(self.ofs_x);
21037 __tmp.put_f32_le(self.ofs_y);
21038 __tmp.put_f32_le(self.ofs_z);
21039 __tmp.put_f32_le(self.diag_x);
21040 __tmp.put_f32_le(self.diag_y);
21041 __tmp.put_f32_le(self.diag_z);
21042 __tmp.put_f32_le(self.offdiag_x);
21043 __tmp.put_f32_le(self.offdiag_y);
21044 __tmp.put_f32_le(self.offdiag_z);
21045 __tmp.put_u8(self.compass_id);
21046 __tmp.put_u8(self.cal_mask);
21047 __tmp.put_u8(self.cal_status as u8);
21048 __tmp.put_u8(self.autosaved);
21049 if matches!(version, MavlinkVersion::V2) {
21050 __tmp.put_f32_le(self.orientation_confidence);
21051 __tmp.put_u8(self.old_orientation as u8);
21052 __tmp.put_u8(self.new_orientation as u8);
21053 __tmp.put_f32_le(self.scale_factor);
21054 let len = __tmp.len();
21055 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21056 } else {
21057 __tmp.len()
21058 }
21059 }
21060}
21061#[doc = "Manual (joystick) control message. This message represents movement axes and button using standard joystick axes nomenclature. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask. For more information see <https://mavlink.io/en/manual_control.html>."]
21062#[doc = ""]
21063#[doc = "ID: 69"]
21064#[derive(Debug, Clone, PartialEq)]
21065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21067#[cfg_attr(feature = "ts", derive(TS))]
21068#[cfg_attr(feature = "ts", ts(export))]
21069pub struct MANUAL_CONTROL_DATA {
21070 #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
21071 pub x: i16,
21072 #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
21073 pub y: i16,
21074 #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
21075 pub z: i16,
21076 #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with clockwise being 1000 and counter-clockwise being -1000, and the yaw of a vehicle."]
21077 pub r: i16,
21078 #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
21079 pub buttons: u16,
21080 #[doc = "The system to be controlled."]
21081 pub target: u8,
21082 #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
21083 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21084 pub buttons2: u16,
21085 #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
21086 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21087 pub enabled_extensions: u8,
21088 #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
21089 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21090 pub s: i16,
21091 #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
21092 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21093 pub t: i16,
21094 #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
21095 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21096 pub aux1: i16,
21097 #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
21098 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21099 pub aux2: i16,
21100 #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
21101 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21102 pub aux3: i16,
21103 #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
21104 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21105 pub aux4: i16,
21106 #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
21107 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21108 pub aux5: i16,
21109 #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
21110 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21111 pub aux6: i16,
21112}
21113impl MANUAL_CONTROL_DATA {
21114 pub const ENCODED_LEN: usize = 30usize;
21115 pub const DEFAULT: Self = Self {
21116 x: 0_i16,
21117 y: 0_i16,
21118 z: 0_i16,
21119 r: 0_i16,
21120 buttons: 0_u16,
21121 target: 0_u8,
21122 buttons2: 0_u16,
21123 enabled_extensions: 0_u8,
21124 s: 0_i16,
21125 t: 0_i16,
21126 aux1: 0_i16,
21127 aux2: 0_i16,
21128 aux3: 0_i16,
21129 aux4: 0_i16,
21130 aux5: 0_i16,
21131 aux6: 0_i16,
21132 };
21133 #[cfg(feature = "arbitrary")]
21134 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21135 use arbitrary::{Arbitrary, Unstructured};
21136 let mut buf = [0u8; 1024];
21137 rng.fill_bytes(&mut buf);
21138 let mut unstructured = Unstructured::new(&buf);
21139 Self::arbitrary(&mut unstructured).unwrap_or_default()
21140 }
21141}
21142impl Default for MANUAL_CONTROL_DATA {
21143 fn default() -> Self {
21144 Self::DEFAULT.clone()
21145 }
21146}
21147impl MessageData for MANUAL_CONTROL_DATA {
21148 type Message = MavMessage;
21149 const ID: u32 = 69u32;
21150 const NAME: &'static str = "MANUAL_CONTROL";
21151 const EXTRA_CRC: u8 = 243u8;
21152 const ENCODED_LEN: usize = 30usize;
21153 fn deser(
21154 _version: MavlinkVersion,
21155 __input: &[u8],
21156 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21157 let avail_len = __input.len();
21158 let mut payload_buf = [0; Self::ENCODED_LEN];
21159 let mut buf = if avail_len < Self::ENCODED_LEN {
21160 payload_buf[0..avail_len].copy_from_slice(__input);
21161 Bytes::new(&payload_buf)
21162 } else {
21163 Bytes::new(__input)
21164 };
21165 let mut __struct = Self::default();
21166 __struct.x = buf.get_i16_le()?;
21167 __struct.y = buf.get_i16_le()?;
21168 __struct.z = buf.get_i16_le()?;
21169 __struct.r = buf.get_i16_le()?;
21170 __struct.buttons = buf.get_u16_le()?;
21171 __struct.target = buf.get_u8()?;
21172 __struct.buttons2 = buf.get_u16_le()?;
21173 __struct.enabled_extensions = buf.get_u8()?;
21174 __struct.s = buf.get_i16_le()?;
21175 __struct.t = buf.get_i16_le()?;
21176 __struct.aux1 = buf.get_i16_le()?;
21177 __struct.aux2 = buf.get_i16_le()?;
21178 __struct.aux3 = buf.get_i16_le()?;
21179 __struct.aux4 = buf.get_i16_le()?;
21180 __struct.aux5 = buf.get_i16_le()?;
21181 __struct.aux6 = buf.get_i16_le()?;
21182 Ok(__struct)
21183 }
21184 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21185 let mut __tmp = BytesMut::new(bytes);
21186 #[allow(clippy::absurd_extreme_comparisons)]
21187 #[allow(unused_comparisons)]
21188 if __tmp.remaining() < Self::ENCODED_LEN {
21189 panic!(
21190 "buffer is too small (need {} bytes, but got {})",
21191 Self::ENCODED_LEN,
21192 __tmp.remaining(),
21193 )
21194 }
21195 __tmp.put_i16_le(self.x);
21196 __tmp.put_i16_le(self.y);
21197 __tmp.put_i16_le(self.z);
21198 __tmp.put_i16_le(self.r);
21199 __tmp.put_u16_le(self.buttons);
21200 __tmp.put_u8(self.target);
21201 if matches!(version, MavlinkVersion::V2) {
21202 __tmp.put_u16_le(self.buttons2);
21203 __tmp.put_u8(self.enabled_extensions);
21204 __tmp.put_i16_le(self.s);
21205 __tmp.put_i16_le(self.t);
21206 __tmp.put_i16_le(self.aux1);
21207 __tmp.put_i16_le(self.aux2);
21208 __tmp.put_i16_le(self.aux3);
21209 __tmp.put_i16_le(self.aux4);
21210 __tmp.put_i16_le(self.aux5);
21211 __tmp.put_i16_le(self.aux6);
21212 let len = __tmp.len();
21213 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21214 } else {
21215 __tmp.len()
21216 }
21217 }
21218}
21219#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
21220#[doc = ""]
21221#[doc = "ID: 81"]
21222#[derive(Debug, Clone, PartialEq)]
21223#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21224#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21225#[cfg_attr(feature = "ts", derive(TS))]
21226#[cfg_attr(feature = "ts", ts(export))]
21227pub struct MANUAL_SETPOINT_DATA {
21228 #[doc = "Timestamp (time since system boot)."]
21229 pub time_boot_ms: u32,
21230 #[doc = "Desired roll rate"]
21231 pub roll: f32,
21232 #[doc = "Desired pitch rate"]
21233 pub pitch: f32,
21234 #[doc = "Desired yaw rate"]
21235 pub yaw: f32,
21236 #[doc = "Collective thrust, normalized to 0 .. 1"]
21237 pub thrust: f32,
21238 #[doc = "Flight mode switch position, 0.. 255"]
21239 pub mode_switch: u8,
21240 #[doc = "Override mode switch position, 0.. 255"]
21241 pub manual_override_switch: u8,
21242}
21243impl MANUAL_SETPOINT_DATA {
21244 pub const ENCODED_LEN: usize = 22usize;
21245 pub const DEFAULT: Self = Self {
21246 time_boot_ms: 0_u32,
21247 roll: 0.0_f32,
21248 pitch: 0.0_f32,
21249 yaw: 0.0_f32,
21250 thrust: 0.0_f32,
21251 mode_switch: 0_u8,
21252 manual_override_switch: 0_u8,
21253 };
21254 #[cfg(feature = "arbitrary")]
21255 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21256 use arbitrary::{Arbitrary, Unstructured};
21257 let mut buf = [0u8; 1024];
21258 rng.fill_bytes(&mut buf);
21259 let mut unstructured = Unstructured::new(&buf);
21260 Self::arbitrary(&mut unstructured).unwrap_or_default()
21261 }
21262}
21263impl Default for MANUAL_SETPOINT_DATA {
21264 fn default() -> Self {
21265 Self::DEFAULT.clone()
21266 }
21267}
21268impl MessageData for MANUAL_SETPOINT_DATA {
21269 type Message = MavMessage;
21270 const ID: u32 = 81u32;
21271 const NAME: &'static str = "MANUAL_SETPOINT";
21272 const EXTRA_CRC: u8 = 106u8;
21273 const ENCODED_LEN: usize = 22usize;
21274 fn deser(
21275 _version: MavlinkVersion,
21276 __input: &[u8],
21277 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21278 let avail_len = __input.len();
21279 let mut payload_buf = [0; Self::ENCODED_LEN];
21280 let mut buf = if avail_len < Self::ENCODED_LEN {
21281 payload_buf[0..avail_len].copy_from_slice(__input);
21282 Bytes::new(&payload_buf)
21283 } else {
21284 Bytes::new(__input)
21285 };
21286 let mut __struct = Self::default();
21287 __struct.time_boot_ms = buf.get_u32_le()?;
21288 __struct.roll = buf.get_f32_le()?;
21289 __struct.pitch = buf.get_f32_le()?;
21290 __struct.yaw = buf.get_f32_le()?;
21291 __struct.thrust = buf.get_f32_le()?;
21292 __struct.mode_switch = buf.get_u8()?;
21293 __struct.manual_override_switch = buf.get_u8()?;
21294 Ok(__struct)
21295 }
21296 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21297 let mut __tmp = BytesMut::new(bytes);
21298 #[allow(clippy::absurd_extreme_comparisons)]
21299 #[allow(unused_comparisons)]
21300 if __tmp.remaining() < Self::ENCODED_LEN {
21301 panic!(
21302 "buffer is too small (need {} bytes, but got {})",
21303 Self::ENCODED_LEN,
21304 __tmp.remaining(),
21305 )
21306 }
21307 __tmp.put_u32_le(self.time_boot_ms);
21308 __tmp.put_f32_le(self.roll);
21309 __tmp.put_f32_le(self.pitch);
21310 __tmp.put_f32_le(self.yaw);
21311 __tmp.put_f32_le(self.thrust);
21312 __tmp.put_u8(self.mode_switch);
21313 __tmp.put_u8(self.manual_override_switch);
21314 if matches!(version, MavlinkVersion::V2) {
21315 let len = __tmp.len();
21316 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21317 } else {
21318 __tmp.len()
21319 }
21320 }
21321}
21322#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21323#[doc = ""]
21324#[doc = "ID: 249"]
21325#[derive(Debug, Clone, PartialEq)]
21326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21328#[cfg_attr(feature = "ts", derive(TS))]
21329#[cfg_attr(feature = "ts", ts(export))]
21330pub struct MEMORY_VECT_DATA {
21331 #[doc = "Starting address of the debug variables"]
21332 pub address: u16,
21333 #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
21334 pub ver: u8,
21335 #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
21336 pub mavtype: u8,
21337 #[doc = "Memory contents at specified address"]
21338 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21339 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21340 pub value: [i8; 32],
21341}
21342impl MEMORY_VECT_DATA {
21343 pub const ENCODED_LEN: usize = 36usize;
21344 pub const DEFAULT: Self = Self {
21345 address: 0_u16,
21346 ver: 0_u8,
21347 mavtype: 0_u8,
21348 value: [0_i8; 32usize],
21349 };
21350 #[cfg(feature = "arbitrary")]
21351 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21352 use arbitrary::{Arbitrary, Unstructured};
21353 let mut buf = [0u8; 1024];
21354 rng.fill_bytes(&mut buf);
21355 let mut unstructured = Unstructured::new(&buf);
21356 Self::arbitrary(&mut unstructured).unwrap_or_default()
21357 }
21358}
21359impl Default for MEMORY_VECT_DATA {
21360 fn default() -> Self {
21361 Self::DEFAULT.clone()
21362 }
21363}
21364impl MessageData for MEMORY_VECT_DATA {
21365 type Message = MavMessage;
21366 const ID: u32 = 249u32;
21367 const NAME: &'static str = "MEMORY_VECT";
21368 const EXTRA_CRC: u8 = 204u8;
21369 const ENCODED_LEN: usize = 36usize;
21370 fn deser(
21371 _version: MavlinkVersion,
21372 __input: &[u8],
21373 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21374 let avail_len = __input.len();
21375 let mut payload_buf = [0; Self::ENCODED_LEN];
21376 let mut buf = if avail_len < Self::ENCODED_LEN {
21377 payload_buf[0..avail_len].copy_from_slice(__input);
21378 Bytes::new(&payload_buf)
21379 } else {
21380 Bytes::new(__input)
21381 };
21382 let mut __struct = Self::default();
21383 __struct.address = buf.get_u16_le()?;
21384 __struct.ver = buf.get_u8()?;
21385 __struct.mavtype = buf.get_u8()?;
21386 for v in &mut __struct.value {
21387 let val = buf.get_i8()?;
21388 *v = val;
21389 }
21390 Ok(__struct)
21391 }
21392 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21393 let mut __tmp = BytesMut::new(bytes);
21394 #[allow(clippy::absurd_extreme_comparisons)]
21395 #[allow(unused_comparisons)]
21396 if __tmp.remaining() < Self::ENCODED_LEN {
21397 panic!(
21398 "buffer is too small (need {} bytes, but got {})",
21399 Self::ENCODED_LEN,
21400 __tmp.remaining(),
21401 )
21402 }
21403 __tmp.put_u16_le(self.address);
21404 __tmp.put_u8(self.ver);
21405 __tmp.put_u8(self.mavtype);
21406 for val in &self.value {
21407 __tmp.put_i8(*val);
21408 }
21409 if matches!(version, MavlinkVersion::V2) {
21410 let len = __tmp.len();
21411 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21412 } else {
21413 __tmp.len()
21414 }
21415 }
21416}
21417#[doc = "The interval between messages for a particular MAVLink message ID. This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
21418#[doc = ""]
21419#[doc = "ID: 244"]
21420#[derive(Debug, Clone, PartialEq)]
21421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21423#[cfg_attr(feature = "ts", derive(TS))]
21424#[cfg_attr(feature = "ts", ts(export))]
21425pub struct MESSAGE_INTERVAL_DATA {
21426 #[doc = "The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available,>0 indicates the interval at which it is sent."]
21427 pub interval_us: i32,
21428 #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
21429 pub message_id: u16,
21430}
21431impl MESSAGE_INTERVAL_DATA {
21432 pub const ENCODED_LEN: usize = 6usize;
21433 pub const DEFAULT: Self = Self {
21434 interval_us: 0_i32,
21435 message_id: 0_u16,
21436 };
21437 #[cfg(feature = "arbitrary")]
21438 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21439 use arbitrary::{Arbitrary, Unstructured};
21440 let mut buf = [0u8; 1024];
21441 rng.fill_bytes(&mut buf);
21442 let mut unstructured = Unstructured::new(&buf);
21443 Self::arbitrary(&mut unstructured).unwrap_or_default()
21444 }
21445}
21446impl Default for MESSAGE_INTERVAL_DATA {
21447 fn default() -> Self {
21448 Self::DEFAULT.clone()
21449 }
21450}
21451impl MessageData for MESSAGE_INTERVAL_DATA {
21452 type Message = MavMessage;
21453 const ID: u32 = 244u32;
21454 const NAME: &'static str = "MESSAGE_INTERVAL";
21455 const EXTRA_CRC: u8 = 95u8;
21456 const ENCODED_LEN: usize = 6usize;
21457 fn deser(
21458 _version: MavlinkVersion,
21459 __input: &[u8],
21460 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21461 let avail_len = __input.len();
21462 let mut payload_buf = [0; Self::ENCODED_LEN];
21463 let mut buf = if avail_len < Self::ENCODED_LEN {
21464 payload_buf[0..avail_len].copy_from_slice(__input);
21465 Bytes::new(&payload_buf)
21466 } else {
21467 Bytes::new(__input)
21468 };
21469 let mut __struct = Self::default();
21470 __struct.interval_us = buf.get_i32_le()?;
21471 __struct.message_id = buf.get_u16_le()?;
21472 Ok(__struct)
21473 }
21474 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21475 let mut __tmp = BytesMut::new(bytes);
21476 #[allow(clippy::absurd_extreme_comparisons)]
21477 #[allow(unused_comparisons)]
21478 if __tmp.remaining() < Self::ENCODED_LEN {
21479 panic!(
21480 "buffer is too small (need {} bytes, but got {})",
21481 Self::ENCODED_LEN,
21482 __tmp.remaining(),
21483 )
21484 }
21485 __tmp.put_i32_le(self.interval_us);
21486 __tmp.put_u16_le(self.message_id);
21487 if matches!(version, MavlinkVersion::V2) {
21488 let len = __tmp.len();
21489 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21490 } else {
21491 __tmp.len()
21492 }
21493 }
21494}
21495#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
21496#[doc = ""]
21497#[doc = "ID: 47"]
21498#[derive(Debug, Clone, PartialEq)]
21499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21501#[cfg_attr(feature = "ts", derive(TS))]
21502#[cfg_attr(feature = "ts", ts(export))]
21503pub struct MISSION_ACK_DATA {
21504 #[doc = "System ID"]
21505 pub target_system: u8,
21506 #[doc = "Component ID"]
21507 pub target_component: u8,
21508 #[doc = "Mission result."]
21509 pub mavtype: MavMissionResult,
21510 #[doc = "Mission type."]
21511 #[cfg_attr(feature = "serde", serde(default))]
21512 pub mission_type: MavMissionType,
21513 #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). 0 if plan ids are not supported. The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
21514 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21515 pub opaque_id: u32,
21516}
21517impl MISSION_ACK_DATA {
21518 pub const ENCODED_LEN: usize = 8usize;
21519 pub const DEFAULT: Self = Self {
21520 target_system: 0_u8,
21521 target_component: 0_u8,
21522 mavtype: MavMissionResult::DEFAULT,
21523 mission_type: MavMissionType::DEFAULT,
21524 opaque_id: 0_u32,
21525 };
21526 #[cfg(feature = "arbitrary")]
21527 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21528 use arbitrary::{Arbitrary, Unstructured};
21529 let mut buf = [0u8; 1024];
21530 rng.fill_bytes(&mut buf);
21531 let mut unstructured = Unstructured::new(&buf);
21532 Self::arbitrary(&mut unstructured).unwrap_or_default()
21533 }
21534}
21535impl Default for MISSION_ACK_DATA {
21536 fn default() -> Self {
21537 Self::DEFAULT.clone()
21538 }
21539}
21540impl MessageData for MISSION_ACK_DATA {
21541 type Message = MavMessage;
21542 const ID: u32 = 47u32;
21543 const NAME: &'static str = "MISSION_ACK";
21544 const EXTRA_CRC: u8 = 153u8;
21545 const ENCODED_LEN: usize = 8usize;
21546 fn deser(
21547 _version: MavlinkVersion,
21548 __input: &[u8],
21549 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21550 let avail_len = __input.len();
21551 let mut payload_buf = [0; Self::ENCODED_LEN];
21552 let mut buf = if avail_len < Self::ENCODED_LEN {
21553 payload_buf[0..avail_len].copy_from_slice(__input);
21554 Bytes::new(&payload_buf)
21555 } else {
21556 Bytes::new(__input)
21557 };
21558 let mut __struct = Self::default();
21559 __struct.target_system = buf.get_u8()?;
21560 __struct.target_component = buf.get_u8()?;
21561 let tmp = buf.get_u8()?;
21562 __struct.mavtype =
21563 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21564 enum_type: "MavMissionResult",
21565 value: tmp as u64,
21566 })?;
21567 let tmp = buf.get_u8()?;
21568 __struct.mission_type =
21569 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21570 enum_type: "MavMissionType",
21571 value: tmp as u64,
21572 })?;
21573 __struct.opaque_id = buf.get_u32_le()?;
21574 Ok(__struct)
21575 }
21576 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21577 let mut __tmp = BytesMut::new(bytes);
21578 #[allow(clippy::absurd_extreme_comparisons)]
21579 #[allow(unused_comparisons)]
21580 if __tmp.remaining() < Self::ENCODED_LEN {
21581 panic!(
21582 "buffer is too small (need {} bytes, but got {})",
21583 Self::ENCODED_LEN,
21584 __tmp.remaining(),
21585 )
21586 }
21587 __tmp.put_u8(self.target_system);
21588 __tmp.put_u8(self.target_component);
21589 __tmp.put_u8(self.mavtype as u8);
21590 if matches!(version, MavlinkVersion::V2) {
21591 __tmp.put_u8(self.mission_type as u8);
21592 __tmp.put_u32_le(self.opaque_id);
21593 let len = __tmp.len();
21594 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21595 } else {
21596 __tmp.len()
21597 }
21598 }
21599}
21600#[doc = "Delete all mission items at once."]
21601#[doc = ""]
21602#[doc = "ID: 45"]
21603#[derive(Debug, Clone, PartialEq)]
21604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21606#[cfg_attr(feature = "ts", derive(TS))]
21607#[cfg_attr(feature = "ts", ts(export))]
21608pub struct MISSION_CLEAR_ALL_DATA {
21609 #[doc = "System ID"]
21610 pub target_system: u8,
21611 #[doc = "Component ID"]
21612 pub target_component: u8,
21613 #[doc = "Mission type."]
21614 #[cfg_attr(feature = "serde", serde(default))]
21615 pub mission_type: MavMissionType,
21616}
21617impl MISSION_CLEAR_ALL_DATA {
21618 pub const ENCODED_LEN: usize = 3usize;
21619 pub const DEFAULT: Self = Self {
21620 target_system: 0_u8,
21621 target_component: 0_u8,
21622 mission_type: MavMissionType::DEFAULT,
21623 };
21624 #[cfg(feature = "arbitrary")]
21625 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21626 use arbitrary::{Arbitrary, Unstructured};
21627 let mut buf = [0u8; 1024];
21628 rng.fill_bytes(&mut buf);
21629 let mut unstructured = Unstructured::new(&buf);
21630 Self::arbitrary(&mut unstructured).unwrap_or_default()
21631 }
21632}
21633impl Default for MISSION_CLEAR_ALL_DATA {
21634 fn default() -> Self {
21635 Self::DEFAULT.clone()
21636 }
21637}
21638impl MessageData for MISSION_CLEAR_ALL_DATA {
21639 type Message = MavMessage;
21640 const ID: u32 = 45u32;
21641 const NAME: &'static str = "MISSION_CLEAR_ALL";
21642 const EXTRA_CRC: u8 = 232u8;
21643 const ENCODED_LEN: usize = 3usize;
21644 fn deser(
21645 _version: MavlinkVersion,
21646 __input: &[u8],
21647 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21648 let avail_len = __input.len();
21649 let mut payload_buf = [0; Self::ENCODED_LEN];
21650 let mut buf = if avail_len < Self::ENCODED_LEN {
21651 payload_buf[0..avail_len].copy_from_slice(__input);
21652 Bytes::new(&payload_buf)
21653 } else {
21654 Bytes::new(__input)
21655 };
21656 let mut __struct = Self::default();
21657 __struct.target_system = buf.get_u8()?;
21658 __struct.target_component = buf.get_u8()?;
21659 let tmp = buf.get_u8()?;
21660 __struct.mission_type =
21661 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21662 enum_type: "MavMissionType",
21663 value: tmp as u64,
21664 })?;
21665 Ok(__struct)
21666 }
21667 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21668 let mut __tmp = BytesMut::new(bytes);
21669 #[allow(clippy::absurd_extreme_comparisons)]
21670 #[allow(unused_comparisons)]
21671 if __tmp.remaining() < Self::ENCODED_LEN {
21672 panic!(
21673 "buffer is too small (need {} bytes, but got {})",
21674 Self::ENCODED_LEN,
21675 __tmp.remaining(),
21676 )
21677 }
21678 __tmp.put_u8(self.target_system);
21679 __tmp.put_u8(self.target_component);
21680 if matches!(version, MavlinkVersion::V2) {
21681 __tmp.put_u8(self.mission_type as u8);
21682 let len = __tmp.len();
21683 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21684 } else {
21685 __tmp.len()
21686 }
21687 }
21688}
21689#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
21690#[doc = ""]
21691#[doc = "ID: 44"]
21692#[derive(Debug, Clone, PartialEq)]
21693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21695#[cfg_attr(feature = "ts", derive(TS))]
21696#[cfg_attr(feature = "ts", ts(export))]
21697pub struct MISSION_COUNT_DATA {
21698 #[doc = "Number of mission items in the sequence"]
21699 pub count: u16,
21700 #[doc = "System ID"]
21701 pub target_system: u8,
21702 #[doc = "Component ID"]
21703 pub target_component: u8,
21704 #[doc = "Mission type."]
21705 #[cfg_attr(feature = "serde", serde(default))]
21706 pub mission_type: MavMissionType,
21707 #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). This field is used when downloading a plan from a vehicle to a GCS. 0 on upload to the vehicle from GCS. 0 if plan ids are not supported. The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
21708 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21709 pub opaque_id: u32,
21710}
21711impl MISSION_COUNT_DATA {
21712 pub const ENCODED_LEN: usize = 9usize;
21713 pub const DEFAULT: Self = Self {
21714 count: 0_u16,
21715 target_system: 0_u8,
21716 target_component: 0_u8,
21717 mission_type: MavMissionType::DEFAULT,
21718 opaque_id: 0_u32,
21719 };
21720 #[cfg(feature = "arbitrary")]
21721 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21722 use arbitrary::{Arbitrary, Unstructured};
21723 let mut buf = [0u8; 1024];
21724 rng.fill_bytes(&mut buf);
21725 let mut unstructured = Unstructured::new(&buf);
21726 Self::arbitrary(&mut unstructured).unwrap_or_default()
21727 }
21728}
21729impl Default for MISSION_COUNT_DATA {
21730 fn default() -> Self {
21731 Self::DEFAULT.clone()
21732 }
21733}
21734impl MessageData for MISSION_COUNT_DATA {
21735 type Message = MavMessage;
21736 const ID: u32 = 44u32;
21737 const NAME: &'static str = "MISSION_COUNT";
21738 const EXTRA_CRC: u8 = 221u8;
21739 const ENCODED_LEN: usize = 9usize;
21740 fn deser(
21741 _version: MavlinkVersion,
21742 __input: &[u8],
21743 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21744 let avail_len = __input.len();
21745 let mut payload_buf = [0; Self::ENCODED_LEN];
21746 let mut buf = if avail_len < Self::ENCODED_LEN {
21747 payload_buf[0..avail_len].copy_from_slice(__input);
21748 Bytes::new(&payload_buf)
21749 } else {
21750 Bytes::new(__input)
21751 };
21752 let mut __struct = Self::default();
21753 __struct.count = buf.get_u16_le()?;
21754 __struct.target_system = buf.get_u8()?;
21755 __struct.target_component = buf.get_u8()?;
21756 let tmp = buf.get_u8()?;
21757 __struct.mission_type =
21758 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21759 enum_type: "MavMissionType",
21760 value: tmp as u64,
21761 })?;
21762 __struct.opaque_id = buf.get_u32_le()?;
21763 Ok(__struct)
21764 }
21765 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21766 let mut __tmp = BytesMut::new(bytes);
21767 #[allow(clippy::absurd_extreme_comparisons)]
21768 #[allow(unused_comparisons)]
21769 if __tmp.remaining() < Self::ENCODED_LEN {
21770 panic!(
21771 "buffer is too small (need {} bytes, but got {})",
21772 Self::ENCODED_LEN,
21773 __tmp.remaining(),
21774 )
21775 }
21776 __tmp.put_u16_le(self.count);
21777 __tmp.put_u8(self.target_system);
21778 __tmp.put_u8(self.target_component);
21779 if matches!(version, MavlinkVersion::V2) {
21780 __tmp.put_u8(self.mission_type as u8);
21781 __tmp.put_u32_le(self.opaque_id);
21782 let len = __tmp.len();
21783 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21784 } else {
21785 __tmp.len()
21786 }
21787 }
21788}
21789#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running). This message should be streamed all the time (nominally at 1Hz). This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
21790#[doc = ""]
21791#[doc = "ID: 42"]
21792#[derive(Debug, Clone, PartialEq)]
21793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21795#[cfg_attr(feature = "ts", derive(TS))]
21796#[cfg_attr(feature = "ts", ts(export))]
21797pub struct MISSION_CURRENT_DATA {
21798 #[doc = "Sequence"]
21799 pub seq: u16,
21800 #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
21801 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21802 pub total: u16,
21803 #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
21804 #[cfg_attr(feature = "serde", serde(default))]
21805 pub mission_state: MissionState,
21806 #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
21807 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21808 pub mission_mode: u8,
21809 #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
21810 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21811 pub mission_id: u32,
21812 #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
21813 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21814 pub fence_id: u32,
21815 #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
21816 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21817 pub rally_points_id: u32,
21818}
21819impl MISSION_CURRENT_DATA {
21820 pub const ENCODED_LEN: usize = 18usize;
21821 pub const DEFAULT: Self = Self {
21822 seq: 0_u16,
21823 total: 0_u16,
21824 mission_state: MissionState::DEFAULT,
21825 mission_mode: 0_u8,
21826 mission_id: 0_u32,
21827 fence_id: 0_u32,
21828 rally_points_id: 0_u32,
21829 };
21830 #[cfg(feature = "arbitrary")]
21831 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21832 use arbitrary::{Arbitrary, Unstructured};
21833 let mut buf = [0u8; 1024];
21834 rng.fill_bytes(&mut buf);
21835 let mut unstructured = Unstructured::new(&buf);
21836 Self::arbitrary(&mut unstructured).unwrap_or_default()
21837 }
21838}
21839impl Default for MISSION_CURRENT_DATA {
21840 fn default() -> Self {
21841 Self::DEFAULT.clone()
21842 }
21843}
21844impl MessageData for MISSION_CURRENT_DATA {
21845 type Message = MavMessage;
21846 const ID: u32 = 42u32;
21847 const NAME: &'static str = "MISSION_CURRENT";
21848 const EXTRA_CRC: u8 = 28u8;
21849 const ENCODED_LEN: usize = 18usize;
21850 fn deser(
21851 _version: MavlinkVersion,
21852 __input: &[u8],
21853 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21854 let avail_len = __input.len();
21855 let mut payload_buf = [0; Self::ENCODED_LEN];
21856 let mut buf = if avail_len < Self::ENCODED_LEN {
21857 payload_buf[0..avail_len].copy_from_slice(__input);
21858 Bytes::new(&payload_buf)
21859 } else {
21860 Bytes::new(__input)
21861 };
21862 let mut __struct = Self::default();
21863 __struct.seq = buf.get_u16_le()?;
21864 __struct.total = buf.get_u16_le()?;
21865 let tmp = buf.get_u8()?;
21866 __struct.mission_state =
21867 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21868 enum_type: "MissionState",
21869 value: tmp as u64,
21870 })?;
21871 __struct.mission_mode = buf.get_u8()?;
21872 __struct.mission_id = buf.get_u32_le()?;
21873 __struct.fence_id = buf.get_u32_le()?;
21874 __struct.rally_points_id = buf.get_u32_le()?;
21875 Ok(__struct)
21876 }
21877 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21878 let mut __tmp = BytesMut::new(bytes);
21879 #[allow(clippy::absurd_extreme_comparisons)]
21880 #[allow(unused_comparisons)]
21881 if __tmp.remaining() < Self::ENCODED_LEN {
21882 panic!(
21883 "buffer is too small (need {} bytes, but got {})",
21884 Self::ENCODED_LEN,
21885 __tmp.remaining(),
21886 )
21887 }
21888 __tmp.put_u16_le(self.seq);
21889 if matches!(version, MavlinkVersion::V2) {
21890 __tmp.put_u16_le(self.total);
21891 __tmp.put_u8(self.mission_state as u8);
21892 __tmp.put_u8(self.mission_mode);
21893 __tmp.put_u32_le(self.mission_id);
21894 __tmp.put_u32_le(self.fence_id);
21895 __tmp.put_u32_le(self.rally_points_id);
21896 let len = __tmp.len();
21897 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21898 } else {
21899 __tmp.len()
21900 }
21901 }
21902}
21903#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
21904#[doc = "Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
21905#[doc = ""]
21906#[doc = "ID: 39"]
21907#[derive(Debug, Clone, PartialEq)]
21908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21910#[cfg_attr(feature = "ts", derive(TS))]
21911#[cfg_attr(feature = "ts", ts(export))]
21912pub struct MISSION_ITEM_DATA {
21913 #[doc = "PARAM1, see MAV_CMD enum"]
21914 pub param1: f32,
21915 #[doc = "PARAM2, see MAV_CMD enum"]
21916 pub param2: f32,
21917 #[doc = "PARAM3, see MAV_CMD enum"]
21918 pub param3: f32,
21919 #[doc = "PARAM4, see MAV_CMD enum"]
21920 pub param4: f32,
21921 #[doc = "PARAM5 / local: X coordinate, global: latitude"]
21922 pub x: f32,
21923 #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
21924 pub y: f32,
21925 #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
21926 pub z: f32,
21927 #[doc = "Sequence"]
21928 pub seq: u16,
21929 #[doc = "The scheduled action for the waypoint."]
21930 pub command: MavCmd,
21931 #[doc = "System ID"]
21932 pub target_system: u8,
21933 #[doc = "Component ID"]
21934 pub target_component: u8,
21935 #[doc = "The coordinate system of the waypoint."]
21936 pub frame: MavFrame,
21937 #[doc = "false:0, true:1"]
21938 pub current: u8,
21939 #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
21940 pub autocontinue: u8,
21941 #[doc = "Mission type."]
21942 #[cfg_attr(feature = "serde", serde(default))]
21943 pub mission_type: MavMissionType,
21944}
21945impl MISSION_ITEM_DATA {
21946 pub const ENCODED_LEN: usize = 38usize;
21947 pub const DEFAULT: Self = Self {
21948 param1: 0.0_f32,
21949 param2: 0.0_f32,
21950 param3: 0.0_f32,
21951 param4: 0.0_f32,
21952 x: 0.0_f32,
21953 y: 0.0_f32,
21954 z: 0.0_f32,
21955 seq: 0_u16,
21956 command: MavCmd::DEFAULT,
21957 target_system: 0_u8,
21958 target_component: 0_u8,
21959 frame: MavFrame::DEFAULT,
21960 current: 0_u8,
21961 autocontinue: 0_u8,
21962 mission_type: MavMissionType::DEFAULT,
21963 };
21964 #[cfg(feature = "arbitrary")]
21965 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21966 use arbitrary::{Arbitrary, Unstructured};
21967 let mut buf = [0u8; 1024];
21968 rng.fill_bytes(&mut buf);
21969 let mut unstructured = Unstructured::new(&buf);
21970 Self::arbitrary(&mut unstructured).unwrap_or_default()
21971 }
21972}
21973impl Default for MISSION_ITEM_DATA {
21974 fn default() -> Self {
21975 Self::DEFAULT.clone()
21976 }
21977}
21978impl MessageData for MISSION_ITEM_DATA {
21979 type Message = MavMessage;
21980 const ID: u32 = 39u32;
21981 const NAME: &'static str = "MISSION_ITEM";
21982 const EXTRA_CRC: u8 = 254u8;
21983 const ENCODED_LEN: usize = 38usize;
21984 fn deser(
21985 _version: MavlinkVersion,
21986 __input: &[u8],
21987 ) -> Result<Self, ::mavlink_core::error::ParserError> {
21988 let avail_len = __input.len();
21989 let mut payload_buf = [0; Self::ENCODED_LEN];
21990 let mut buf = if avail_len < Self::ENCODED_LEN {
21991 payload_buf[0..avail_len].copy_from_slice(__input);
21992 Bytes::new(&payload_buf)
21993 } else {
21994 Bytes::new(__input)
21995 };
21996 let mut __struct = Self::default();
21997 __struct.param1 = buf.get_f32_le()?;
21998 __struct.param2 = buf.get_f32_le()?;
21999 __struct.param3 = buf.get_f32_le()?;
22000 __struct.param4 = buf.get_f32_le()?;
22001 __struct.x = buf.get_f32_le()?;
22002 __struct.y = buf.get_f32_le()?;
22003 __struct.z = buf.get_f32_le()?;
22004 __struct.seq = buf.get_u16_le()?;
22005 let tmp = buf.get_u16_le()?;
22006 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
22007 ::mavlink_core::error::ParserError::InvalidEnum {
22008 enum_type: "MavCmd",
22009 value: tmp as u64,
22010 },
22011 )?;
22012 __struct.target_system = buf.get_u8()?;
22013 __struct.target_component = buf.get_u8()?;
22014 let tmp = buf.get_u8()?;
22015 __struct.frame =
22016 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22017 enum_type: "MavFrame",
22018 value: tmp as u64,
22019 })?;
22020 __struct.current = buf.get_u8()?;
22021 __struct.autocontinue = buf.get_u8()?;
22022 let tmp = buf.get_u8()?;
22023 __struct.mission_type =
22024 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22025 enum_type: "MavMissionType",
22026 value: tmp as u64,
22027 })?;
22028 Ok(__struct)
22029 }
22030 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22031 let mut __tmp = BytesMut::new(bytes);
22032 #[allow(clippy::absurd_extreme_comparisons)]
22033 #[allow(unused_comparisons)]
22034 if __tmp.remaining() < Self::ENCODED_LEN {
22035 panic!(
22036 "buffer is too small (need {} bytes, but got {})",
22037 Self::ENCODED_LEN,
22038 __tmp.remaining(),
22039 )
22040 }
22041 __tmp.put_f32_le(self.param1);
22042 __tmp.put_f32_le(self.param2);
22043 __tmp.put_f32_le(self.param3);
22044 __tmp.put_f32_le(self.param4);
22045 __tmp.put_f32_le(self.x);
22046 __tmp.put_f32_le(self.y);
22047 __tmp.put_f32_le(self.z);
22048 __tmp.put_u16_le(self.seq);
22049 __tmp.put_u16_le(self.command as u16);
22050 __tmp.put_u8(self.target_system);
22051 __tmp.put_u8(self.target_component);
22052 __tmp.put_u8(self.frame as u8);
22053 __tmp.put_u8(self.current);
22054 __tmp.put_u8(self.autocontinue);
22055 if matches!(version, MavlinkVersion::V2) {
22056 __tmp.put_u8(self.mission_type as u8);
22057 let len = __tmp.len();
22058 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22059 } else {
22060 __tmp.len()
22061 }
22062 }
22063}
22064#[doc = "Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
22065#[doc = ""]
22066#[doc = "ID: 73"]
22067#[derive(Debug, Clone, PartialEq)]
22068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22070#[cfg_attr(feature = "ts", derive(TS))]
22071#[cfg_attr(feature = "ts", ts(export))]
22072pub struct MISSION_ITEM_INT_DATA {
22073 #[doc = "PARAM1, see MAV_CMD enum"]
22074 pub param1: f32,
22075 #[doc = "PARAM2, see MAV_CMD enum"]
22076 pub param2: f32,
22077 #[doc = "PARAM3, see MAV_CMD enum"]
22078 pub param3: f32,
22079 #[doc = "PARAM4, see MAV_CMD enum"]
22080 pub param4: f32,
22081 #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
22082 pub x: i32,
22083 #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
22084 pub y: i32,
22085 #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
22086 pub z: f32,
22087 #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
22088 pub seq: u16,
22089 #[doc = "The scheduled action for the waypoint."]
22090 pub command: MavCmd,
22091 #[doc = "System ID"]
22092 pub target_system: u8,
22093 #[doc = "Component ID"]
22094 pub target_component: u8,
22095 #[doc = "The coordinate system of the waypoint."]
22096 pub frame: MavFrame,
22097 #[doc = "false:0, true:1"]
22098 pub current: u8,
22099 #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
22100 pub autocontinue: u8,
22101 #[doc = "Mission type."]
22102 #[cfg_attr(feature = "serde", serde(default))]
22103 pub mission_type: MavMissionType,
22104}
22105impl MISSION_ITEM_INT_DATA {
22106 pub const ENCODED_LEN: usize = 38usize;
22107 pub const DEFAULT: Self = Self {
22108 param1: 0.0_f32,
22109 param2: 0.0_f32,
22110 param3: 0.0_f32,
22111 param4: 0.0_f32,
22112 x: 0_i32,
22113 y: 0_i32,
22114 z: 0.0_f32,
22115 seq: 0_u16,
22116 command: MavCmd::DEFAULT,
22117 target_system: 0_u8,
22118 target_component: 0_u8,
22119 frame: MavFrame::DEFAULT,
22120 current: 0_u8,
22121 autocontinue: 0_u8,
22122 mission_type: MavMissionType::DEFAULT,
22123 };
22124 #[cfg(feature = "arbitrary")]
22125 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22126 use arbitrary::{Arbitrary, Unstructured};
22127 let mut buf = [0u8; 1024];
22128 rng.fill_bytes(&mut buf);
22129 let mut unstructured = Unstructured::new(&buf);
22130 Self::arbitrary(&mut unstructured).unwrap_or_default()
22131 }
22132}
22133impl Default for MISSION_ITEM_INT_DATA {
22134 fn default() -> Self {
22135 Self::DEFAULT.clone()
22136 }
22137}
22138impl MessageData for MISSION_ITEM_INT_DATA {
22139 type Message = MavMessage;
22140 const ID: u32 = 73u32;
22141 const NAME: &'static str = "MISSION_ITEM_INT";
22142 const EXTRA_CRC: u8 = 38u8;
22143 const ENCODED_LEN: usize = 38usize;
22144 fn deser(
22145 _version: MavlinkVersion,
22146 __input: &[u8],
22147 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22148 let avail_len = __input.len();
22149 let mut payload_buf = [0; Self::ENCODED_LEN];
22150 let mut buf = if avail_len < Self::ENCODED_LEN {
22151 payload_buf[0..avail_len].copy_from_slice(__input);
22152 Bytes::new(&payload_buf)
22153 } else {
22154 Bytes::new(__input)
22155 };
22156 let mut __struct = Self::default();
22157 __struct.param1 = buf.get_f32_le()?;
22158 __struct.param2 = buf.get_f32_le()?;
22159 __struct.param3 = buf.get_f32_le()?;
22160 __struct.param4 = buf.get_f32_le()?;
22161 __struct.x = buf.get_i32_le()?;
22162 __struct.y = buf.get_i32_le()?;
22163 __struct.z = buf.get_f32_le()?;
22164 __struct.seq = buf.get_u16_le()?;
22165 let tmp = buf.get_u16_le()?;
22166 __struct.command = FromPrimitive::from_u16(tmp).ok_or(
22167 ::mavlink_core::error::ParserError::InvalidEnum {
22168 enum_type: "MavCmd",
22169 value: tmp as u64,
22170 },
22171 )?;
22172 __struct.target_system = buf.get_u8()?;
22173 __struct.target_component = buf.get_u8()?;
22174 let tmp = buf.get_u8()?;
22175 __struct.frame =
22176 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22177 enum_type: "MavFrame",
22178 value: tmp as u64,
22179 })?;
22180 __struct.current = buf.get_u8()?;
22181 __struct.autocontinue = buf.get_u8()?;
22182 let tmp = buf.get_u8()?;
22183 __struct.mission_type =
22184 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22185 enum_type: "MavMissionType",
22186 value: tmp as u64,
22187 })?;
22188 Ok(__struct)
22189 }
22190 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22191 let mut __tmp = BytesMut::new(bytes);
22192 #[allow(clippy::absurd_extreme_comparisons)]
22193 #[allow(unused_comparisons)]
22194 if __tmp.remaining() < Self::ENCODED_LEN {
22195 panic!(
22196 "buffer is too small (need {} bytes, but got {})",
22197 Self::ENCODED_LEN,
22198 __tmp.remaining(),
22199 )
22200 }
22201 __tmp.put_f32_le(self.param1);
22202 __tmp.put_f32_le(self.param2);
22203 __tmp.put_f32_le(self.param3);
22204 __tmp.put_f32_le(self.param4);
22205 __tmp.put_i32_le(self.x);
22206 __tmp.put_i32_le(self.y);
22207 __tmp.put_f32_le(self.z);
22208 __tmp.put_u16_le(self.seq);
22209 __tmp.put_u16_le(self.command as u16);
22210 __tmp.put_u8(self.target_system);
22211 __tmp.put_u8(self.target_component);
22212 __tmp.put_u8(self.frame as u8);
22213 __tmp.put_u8(self.current);
22214 __tmp.put_u8(self.autocontinue);
22215 if matches!(version, MavlinkVersion::V2) {
22216 __tmp.put_u8(self.mission_type as u8);
22217 let len = __tmp.len();
22218 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22219 } else {
22220 __tmp.len()
22221 }
22222 }
22223}
22224#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
22225#[doc = ""]
22226#[doc = "ID: 46"]
22227#[derive(Debug, Clone, PartialEq)]
22228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22229#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22230#[cfg_attr(feature = "ts", derive(TS))]
22231#[cfg_attr(feature = "ts", ts(export))]
22232pub struct MISSION_ITEM_REACHED_DATA {
22233 #[doc = "Sequence"]
22234 pub seq: u16,
22235}
22236impl MISSION_ITEM_REACHED_DATA {
22237 pub const ENCODED_LEN: usize = 2usize;
22238 pub const DEFAULT: Self = Self { seq: 0_u16 };
22239 #[cfg(feature = "arbitrary")]
22240 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22241 use arbitrary::{Arbitrary, Unstructured};
22242 let mut buf = [0u8; 1024];
22243 rng.fill_bytes(&mut buf);
22244 let mut unstructured = Unstructured::new(&buf);
22245 Self::arbitrary(&mut unstructured).unwrap_or_default()
22246 }
22247}
22248impl Default for MISSION_ITEM_REACHED_DATA {
22249 fn default() -> Self {
22250 Self::DEFAULT.clone()
22251 }
22252}
22253impl MessageData for MISSION_ITEM_REACHED_DATA {
22254 type Message = MavMessage;
22255 const ID: u32 = 46u32;
22256 const NAME: &'static str = "MISSION_ITEM_REACHED";
22257 const EXTRA_CRC: u8 = 11u8;
22258 const ENCODED_LEN: usize = 2usize;
22259 fn deser(
22260 _version: MavlinkVersion,
22261 __input: &[u8],
22262 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22263 let avail_len = __input.len();
22264 let mut payload_buf = [0; Self::ENCODED_LEN];
22265 let mut buf = if avail_len < Self::ENCODED_LEN {
22266 payload_buf[0..avail_len].copy_from_slice(__input);
22267 Bytes::new(&payload_buf)
22268 } else {
22269 Bytes::new(__input)
22270 };
22271 let mut __struct = Self::default();
22272 __struct.seq = buf.get_u16_le()?;
22273 Ok(__struct)
22274 }
22275 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22276 let mut __tmp = BytesMut::new(bytes);
22277 #[allow(clippy::absurd_extreme_comparisons)]
22278 #[allow(unused_comparisons)]
22279 if __tmp.remaining() < Self::ENCODED_LEN {
22280 panic!(
22281 "buffer is too small (need {} bytes, but got {})",
22282 Self::ENCODED_LEN,
22283 __tmp.remaining(),
22284 )
22285 }
22286 __tmp.put_u16_le(self.seq);
22287 if matches!(version, MavlinkVersion::V2) {
22288 let len = __tmp.len();
22289 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22290 } else {
22291 __tmp.len()
22292 }
22293 }
22294}
22295#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
22296#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
22297#[doc = ""]
22298#[doc = "ID: 40"]
22299#[derive(Debug, Clone, PartialEq)]
22300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22302#[cfg_attr(feature = "ts", derive(TS))]
22303#[cfg_attr(feature = "ts", ts(export))]
22304pub struct MISSION_REQUEST_DATA {
22305 #[doc = "Sequence"]
22306 pub seq: u16,
22307 #[doc = "System ID"]
22308 pub target_system: u8,
22309 #[doc = "Component ID"]
22310 pub target_component: u8,
22311 #[doc = "Mission type."]
22312 #[cfg_attr(feature = "serde", serde(default))]
22313 pub mission_type: MavMissionType,
22314}
22315impl MISSION_REQUEST_DATA {
22316 pub const ENCODED_LEN: usize = 5usize;
22317 pub const DEFAULT: Self = Self {
22318 seq: 0_u16,
22319 target_system: 0_u8,
22320 target_component: 0_u8,
22321 mission_type: MavMissionType::DEFAULT,
22322 };
22323 #[cfg(feature = "arbitrary")]
22324 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22325 use arbitrary::{Arbitrary, Unstructured};
22326 let mut buf = [0u8; 1024];
22327 rng.fill_bytes(&mut buf);
22328 let mut unstructured = Unstructured::new(&buf);
22329 Self::arbitrary(&mut unstructured).unwrap_or_default()
22330 }
22331}
22332impl Default for MISSION_REQUEST_DATA {
22333 fn default() -> Self {
22334 Self::DEFAULT.clone()
22335 }
22336}
22337impl MessageData for MISSION_REQUEST_DATA {
22338 type Message = MavMessage;
22339 const ID: u32 = 40u32;
22340 const NAME: &'static str = "MISSION_REQUEST";
22341 const EXTRA_CRC: u8 = 230u8;
22342 const ENCODED_LEN: usize = 5usize;
22343 fn deser(
22344 _version: MavlinkVersion,
22345 __input: &[u8],
22346 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22347 let avail_len = __input.len();
22348 let mut payload_buf = [0; Self::ENCODED_LEN];
22349 let mut buf = if avail_len < Self::ENCODED_LEN {
22350 payload_buf[0..avail_len].copy_from_slice(__input);
22351 Bytes::new(&payload_buf)
22352 } else {
22353 Bytes::new(__input)
22354 };
22355 let mut __struct = Self::default();
22356 __struct.seq = buf.get_u16_le()?;
22357 __struct.target_system = buf.get_u8()?;
22358 __struct.target_component = buf.get_u8()?;
22359 let tmp = buf.get_u8()?;
22360 __struct.mission_type =
22361 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22362 enum_type: "MavMissionType",
22363 value: tmp as u64,
22364 })?;
22365 Ok(__struct)
22366 }
22367 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22368 let mut __tmp = BytesMut::new(bytes);
22369 #[allow(clippy::absurd_extreme_comparisons)]
22370 #[allow(unused_comparisons)]
22371 if __tmp.remaining() < Self::ENCODED_LEN {
22372 panic!(
22373 "buffer is too small (need {} bytes, but got {})",
22374 Self::ENCODED_LEN,
22375 __tmp.remaining(),
22376 )
22377 }
22378 __tmp.put_u16_le(self.seq);
22379 __tmp.put_u8(self.target_system);
22380 __tmp.put_u8(self.target_component);
22381 if matches!(version, MavlinkVersion::V2) {
22382 __tmp.put_u8(self.mission_type as u8);
22383 let len = __tmp.len();
22384 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22385 } else {
22386 __tmp.len()
22387 }
22388 }
22389}
22390#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
22391#[doc = ""]
22392#[doc = "ID: 51"]
22393#[derive(Debug, Clone, PartialEq)]
22394#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22396#[cfg_attr(feature = "ts", derive(TS))]
22397#[cfg_attr(feature = "ts", ts(export))]
22398pub struct MISSION_REQUEST_INT_DATA {
22399 #[doc = "Sequence"]
22400 pub seq: u16,
22401 #[doc = "System ID"]
22402 pub target_system: u8,
22403 #[doc = "Component ID"]
22404 pub target_component: u8,
22405 #[doc = "Mission type."]
22406 #[cfg_attr(feature = "serde", serde(default))]
22407 pub mission_type: MavMissionType,
22408}
22409impl MISSION_REQUEST_INT_DATA {
22410 pub const ENCODED_LEN: usize = 5usize;
22411 pub const DEFAULT: Self = Self {
22412 seq: 0_u16,
22413 target_system: 0_u8,
22414 target_component: 0_u8,
22415 mission_type: MavMissionType::DEFAULT,
22416 };
22417 #[cfg(feature = "arbitrary")]
22418 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22419 use arbitrary::{Arbitrary, Unstructured};
22420 let mut buf = [0u8; 1024];
22421 rng.fill_bytes(&mut buf);
22422 let mut unstructured = Unstructured::new(&buf);
22423 Self::arbitrary(&mut unstructured).unwrap_or_default()
22424 }
22425}
22426impl Default for MISSION_REQUEST_INT_DATA {
22427 fn default() -> Self {
22428 Self::DEFAULT.clone()
22429 }
22430}
22431impl MessageData for MISSION_REQUEST_INT_DATA {
22432 type Message = MavMessage;
22433 const ID: u32 = 51u32;
22434 const NAME: &'static str = "MISSION_REQUEST_INT";
22435 const EXTRA_CRC: u8 = 196u8;
22436 const ENCODED_LEN: usize = 5usize;
22437 fn deser(
22438 _version: MavlinkVersion,
22439 __input: &[u8],
22440 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22441 let avail_len = __input.len();
22442 let mut payload_buf = [0; Self::ENCODED_LEN];
22443 let mut buf = if avail_len < Self::ENCODED_LEN {
22444 payload_buf[0..avail_len].copy_from_slice(__input);
22445 Bytes::new(&payload_buf)
22446 } else {
22447 Bytes::new(__input)
22448 };
22449 let mut __struct = Self::default();
22450 __struct.seq = buf.get_u16_le()?;
22451 __struct.target_system = buf.get_u8()?;
22452 __struct.target_component = buf.get_u8()?;
22453 let tmp = buf.get_u8()?;
22454 __struct.mission_type =
22455 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22456 enum_type: "MavMissionType",
22457 value: tmp as u64,
22458 })?;
22459 Ok(__struct)
22460 }
22461 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22462 let mut __tmp = BytesMut::new(bytes);
22463 #[allow(clippy::absurd_extreme_comparisons)]
22464 #[allow(unused_comparisons)]
22465 if __tmp.remaining() < Self::ENCODED_LEN {
22466 panic!(
22467 "buffer is too small (need {} bytes, but got {})",
22468 Self::ENCODED_LEN,
22469 __tmp.remaining(),
22470 )
22471 }
22472 __tmp.put_u16_le(self.seq);
22473 __tmp.put_u8(self.target_system);
22474 __tmp.put_u8(self.target_component);
22475 if matches!(version, MavlinkVersion::V2) {
22476 __tmp.put_u8(self.mission_type as u8);
22477 let len = __tmp.len();
22478 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22479 } else {
22480 __tmp.len()
22481 }
22482 }
22483}
22484#[doc = "Request the overall list of mission items from the system/component."]
22485#[doc = ""]
22486#[doc = "ID: 43"]
22487#[derive(Debug, Clone, PartialEq)]
22488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22489#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22490#[cfg_attr(feature = "ts", derive(TS))]
22491#[cfg_attr(feature = "ts", ts(export))]
22492pub struct MISSION_REQUEST_LIST_DATA {
22493 #[doc = "System ID"]
22494 pub target_system: u8,
22495 #[doc = "Component ID"]
22496 pub target_component: u8,
22497 #[doc = "Mission type."]
22498 #[cfg_attr(feature = "serde", serde(default))]
22499 pub mission_type: MavMissionType,
22500}
22501impl MISSION_REQUEST_LIST_DATA {
22502 pub const ENCODED_LEN: usize = 3usize;
22503 pub const DEFAULT: Self = Self {
22504 target_system: 0_u8,
22505 target_component: 0_u8,
22506 mission_type: MavMissionType::DEFAULT,
22507 };
22508 #[cfg(feature = "arbitrary")]
22509 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22510 use arbitrary::{Arbitrary, Unstructured};
22511 let mut buf = [0u8; 1024];
22512 rng.fill_bytes(&mut buf);
22513 let mut unstructured = Unstructured::new(&buf);
22514 Self::arbitrary(&mut unstructured).unwrap_or_default()
22515 }
22516}
22517impl Default for MISSION_REQUEST_LIST_DATA {
22518 fn default() -> Self {
22519 Self::DEFAULT.clone()
22520 }
22521}
22522impl MessageData for MISSION_REQUEST_LIST_DATA {
22523 type Message = MavMessage;
22524 const ID: u32 = 43u32;
22525 const NAME: &'static str = "MISSION_REQUEST_LIST";
22526 const EXTRA_CRC: u8 = 132u8;
22527 const ENCODED_LEN: usize = 3usize;
22528 fn deser(
22529 _version: MavlinkVersion,
22530 __input: &[u8],
22531 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22532 let avail_len = __input.len();
22533 let mut payload_buf = [0; Self::ENCODED_LEN];
22534 let mut buf = if avail_len < Self::ENCODED_LEN {
22535 payload_buf[0..avail_len].copy_from_slice(__input);
22536 Bytes::new(&payload_buf)
22537 } else {
22538 Bytes::new(__input)
22539 };
22540 let mut __struct = Self::default();
22541 __struct.target_system = buf.get_u8()?;
22542 __struct.target_component = buf.get_u8()?;
22543 let tmp = buf.get_u8()?;
22544 __struct.mission_type =
22545 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22546 enum_type: "MavMissionType",
22547 value: tmp as u64,
22548 })?;
22549 Ok(__struct)
22550 }
22551 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22552 let mut __tmp = BytesMut::new(bytes);
22553 #[allow(clippy::absurd_extreme_comparisons)]
22554 #[allow(unused_comparisons)]
22555 if __tmp.remaining() < Self::ENCODED_LEN {
22556 panic!(
22557 "buffer is too small (need {} bytes, but got {})",
22558 Self::ENCODED_LEN,
22559 __tmp.remaining(),
22560 )
22561 }
22562 __tmp.put_u8(self.target_system);
22563 __tmp.put_u8(self.target_component);
22564 if matches!(version, MavlinkVersion::V2) {
22565 __tmp.put_u8(self.mission_type as u8);
22566 let len = __tmp.len();
22567 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22568 } else {
22569 __tmp.len()
22570 }
22571 }
22572}
22573#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
22574#[doc = ""]
22575#[doc = "ID: 37"]
22576#[derive(Debug, Clone, PartialEq)]
22577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22579#[cfg_attr(feature = "ts", derive(TS))]
22580#[cfg_attr(feature = "ts", ts(export))]
22581pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
22582 #[doc = "Start index"]
22583 pub start_index: i16,
22584 #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
22585 pub end_index: i16,
22586 #[doc = "System ID"]
22587 pub target_system: u8,
22588 #[doc = "Component ID"]
22589 pub target_component: u8,
22590 #[doc = "Mission type."]
22591 #[cfg_attr(feature = "serde", serde(default))]
22592 pub mission_type: MavMissionType,
22593}
22594impl MISSION_REQUEST_PARTIAL_LIST_DATA {
22595 pub const ENCODED_LEN: usize = 7usize;
22596 pub const DEFAULT: Self = Self {
22597 start_index: 0_i16,
22598 end_index: 0_i16,
22599 target_system: 0_u8,
22600 target_component: 0_u8,
22601 mission_type: MavMissionType::DEFAULT,
22602 };
22603 #[cfg(feature = "arbitrary")]
22604 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22605 use arbitrary::{Arbitrary, Unstructured};
22606 let mut buf = [0u8; 1024];
22607 rng.fill_bytes(&mut buf);
22608 let mut unstructured = Unstructured::new(&buf);
22609 Self::arbitrary(&mut unstructured).unwrap_or_default()
22610 }
22611}
22612impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
22613 fn default() -> Self {
22614 Self::DEFAULT.clone()
22615 }
22616}
22617impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
22618 type Message = MavMessage;
22619 const ID: u32 = 37u32;
22620 const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
22621 const EXTRA_CRC: u8 = 212u8;
22622 const ENCODED_LEN: usize = 7usize;
22623 fn deser(
22624 _version: MavlinkVersion,
22625 __input: &[u8],
22626 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22627 let avail_len = __input.len();
22628 let mut payload_buf = [0; Self::ENCODED_LEN];
22629 let mut buf = if avail_len < Self::ENCODED_LEN {
22630 payload_buf[0..avail_len].copy_from_slice(__input);
22631 Bytes::new(&payload_buf)
22632 } else {
22633 Bytes::new(__input)
22634 };
22635 let mut __struct = Self::default();
22636 __struct.start_index = buf.get_i16_le()?;
22637 __struct.end_index = buf.get_i16_le()?;
22638 __struct.target_system = buf.get_u8()?;
22639 __struct.target_component = buf.get_u8()?;
22640 let tmp = buf.get_u8()?;
22641 __struct.mission_type =
22642 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22643 enum_type: "MavMissionType",
22644 value: tmp as u64,
22645 })?;
22646 Ok(__struct)
22647 }
22648 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22649 let mut __tmp = BytesMut::new(bytes);
22650 #[allow(clippy::absurd_extreme_comparisons)]
22651 #[allow(unused_comparisons)]
22652 if __tmp.remaining() < Self::ENCODED_LEN {
22653 panic!(
22654 "buffer is too small (need {} bytes, but got {})",
22655 Self::ENCODED_LEN,
22656 __tmp.remaining(),
22657 )
22658 }
22659 __tmp.put_i16_le(self.start_index);
22660 __tmp.put_i16_le(self.end_index);
22661 __tmp.put_u8(self.target_system);
22662 __tmp.put_u8(self.target_component);
22663 if matches!(version, MavlinkVersion::V2) {
22664 __tmp.put_u8(self.mission_type as u8);
22665 let len = __tmp.len();
22666 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22667 } else {
22668 __tmp.len()
22669 }
22670 }
22671}
22672#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Superseded since 2022-08)"]
22673#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2). This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. If the system is not in mission mode this message must not trigger a switch to mission mode."]
22674#[doc = ""]
22675#[doc = "ID: 41"]
22676#[derive(Debug, Clone, PartialEq)]
22677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22679#[cfg_attr(feature = "ts", derive(TS))]
22680#[cfg_attr(feature = "ts", ts(export))]
22681pub struct MISSION_SET_CURRENT_DATA {
22682 #[doc = "Sequence"]
22683 pub seq: u16,
22684 #[doc = "System ID"]
22685 pub target_system: u8,
22686 #[doc = "Component ID"]
22687 pub target_component: u8,
22688}
22689impl MISSION_SET_CURRENT_DATA {
22690 pub const ENCODED_LEN: usize = 4usize;
22691 pub const DEFAULT: Self = Self {
22692 seq: 0_u16,
22693 target_system: 0_u8,
22694 target_component: 0_u8,
22695 };
22696 #[cfg(feature = "arbitrary")]
22697 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22698 use arbitrary::{Arbitrary, Unstructured};
22699 let mut buf = [0u8; 1024];
22700 rng.fill_bytes(&mut buf);
22701 let mut unstructured = Unstructured::new(&buf);
22702 Self::arbitrary(&mut unstructured).unwrap_or_default()
22703 }
22704}
22705impl Default for MISSION_SET_CURRENT_DATA {
22706 fn default() -> Self {
22707 Self::DEFAULT.clone()
22708 }
22709}
22710impl MessageData for MISSION_SET_CURRENT_DATA {
22711 type Message = MavMessage;
22712 const ID: u32 = 41u32;
22713 const NAME: &'static str = "MISSION_SET_CURRENT";
22714 const EXTRA_CRC: u8 = 28u8;
22715 const ENCODED_LEN: usize = 4usize;
22716 fn deser(
22717 _version: MavlinkVersion,
22718 __input: &[u8],
22719 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22720 let avail_len = __input.len();
22721 let mut payload_buf = [0; Self::ENCODED_LEN];
22722 let mut buf = if avail_len < Self::ENCODED_LEN {
22723 payload_buf[0..avail_len].copy_from_slice(__input);
22724 Bytes::new(&payload_buf)
22725 } else {
22726 Bytes::new(__input)
22727 };
22728 let mut __struct = Self::default();
22729 __struct.seq = buf.get_u16_le()?;
22730 __struct.target_system = buf.get_u8()?;
22731 __struct.target_component = buf.get_u8()?;
22732 Ok(__struct)
22733 }
22734 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22735 let mut __tmp = BytesMut::new(bytes);
22736 #[allow(clippy::absurd_extreme_comparisons)]
22737 #[allow(unused_comparisons)]
22738 if __tmp.remaining() < Self::ENCODED_LEN {
22739 panic!(
22740 "buffer is too small (need {} bytes, but got {})",
22741 Self::ENCODED_LEN,
22742 __tmp.remaining(),
22743 )
22744 }
22745 __tmp.put_u16_le(self.seq);
22746 __tmp.put_u8(self.target_system);
22747 __tmp.put_u8(self.target_component);
22748 if matches!(version, MavlinkVersion::V2) {
22749 let len = __tmp.len();
22750 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22751 } else {
22752 __tmp.len()
22753 }
22754 }
22755}
22756#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
22757#[doc = ""]
22758#[doc = "ID: 38"]
22759#[derive(Debug, Clone, PartialEq)]
22760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22762#[cfg_attr(feature = "ts", derive(TS))]
22763#[cfg_attr(feature = "ts", ts(export))]
22764pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
22765 #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
22766 pub start_index: i16,
22767 #[doc = "End index, equal or greater than start index."]
22768 pub end_index: i16,
22769 #[doc = "System ID"]
22770 pub target_system: u8,
22771 #[doc = "Component ID"]
22772 pub target_component: u8,
22773 #[doc = "Mission type."]
22774 #[cfg_attr(feature = "serde", serde(default))]
22775 pub mission_type: MavMissionType,
22776}
22777impl MISSION_WRITE_PARTIAL_LIST_DATA {
22778 pub const ENCODED_LEN: usize = 7usize;
22779 pub const DEFAULT: Self = Self {
22780 start_index: 0_i16,
22781 end_index: 0_i16,
22782 target_system: 0_u8,
22783 target_component: 0_u8,
22784 mission_type: MavMissionType::DEFAULT,
22785 };
22786 #[cfg(feature = "arbitrary")]
22787 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22788 use arbitrary::{Arbitrary, Unstructured};
22789 let mut buf = [0u8; 1024];
22790 rng.fill_bytes(&mut buf);
22791 let mut unstructured = Unstructured::new(&buf);
22792 Self::arbitrary(&mut unstructured).unwrap_or_default()
22793 }
22794}
22795impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
22796 fn default() -> Self {
22797 Self::DEFAULT.clone()
22798 }
22799}
22800impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
22801 type Message = MavMessage;
22802 const ID: u32 = 38u32;
22803 const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
22804 const EXTRA_CRC: u8 = 9u8;
22805 const ENCODED_LEN: usize = 7usize;
22806 fn deser(
22807 _version: MavlinkVersion,
22808 __input: &[u8],
22809 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22810 let avail_len = __input.len();
22811 let mut payload_buf = [0; Self::ENCODED_LEN];
22812 let mut buf = if avail_len < Self::ENCODED_LEN {
22813 payload_buf[0..avail_len].copy_from_slice(__input);
22814 Bytes::new(&payload_buf)
22815 } else {
22816 Bytes::new(__input)
22817 };
22818 let mut __struct = Self::default();
22819 __struct.start_index = buf.get_i16_le()?;
22820 __struct.end_index = buf.get_i16_le()?;
22821 __struct.target_system = buf.get_u8()?;
22822 __struct.target_component = buf.get_u8()?;
22823 let tmp = buf.get_u8()?;
22824 __struct.mission_type =
22825 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22826 enum_type: "MavMissionType",
22827 value: tmp as u64,
22828 })?;
22829 Ok(__struct)
22830 }
22831 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22832 let mut __tmp = BytesMut::new(bytes);
22833 #[allow(clippy::absurd_extreme_comparisons)]
22834 #[allow(unused_comparisons)]
22835 if __tmp.remaining() < Self::ENCODED_LEN {
22836 panic!(
22837 "buffer is too small (need {} bytes, but got {})",
22838 Self::ENCODED_LEN,
22839 __tmp.remaining(),
22840 )
22841 }
22842 __tmp.put_i16_le(self.start_index);
22843 __tmp.put_i16_le(self.end_index);
22844 __tmp.put_u8(self.target_system);
22845 __tmp.put_u8(self.target_component);
22846 if matches!(version, MavlinkVersion::V2) {
22847 __tmp.put_u8(self.mission_type as u8);
22848 let len = __tmp.len();
22849 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22850 } else {
22851 __tmp.len()
22852 }
22853 }
22854}
22855#[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Superseded since 2020-01)"]
22856#[doc = "Orientation of a mount."]
22857#[doc = ""]
22858#[doc = "ID: 265"]
22859#[derive(Debug, Clone, PartialEq)]
22860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22862#[cfg_attr(feature = "ts", derive(TS))]
22863#[cfg_attr(feature = "ts", ts(export))]
22864pub struct MOUNT_ORIENTATION_DATA {
22865 #[doc = "Timestamp (time since system boot)."]
22866 pub time_boot_ms: u32,
22867 #[doc = "Roll in global frame (set to NaN for invalid)."]
22868 pub roll: f32,
22869 #[doc = "Pitch in global frame (set to NaN for invalid)."]
22870 pub pitch: f32,
22871 #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
22872 pub yaw: f32,
22873 #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
22874 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22875 pub yaw_absolute: f32,
22876}
22877impl MOUNT_ORIENTATION_DATA {
22878 pub const ENCODED_LEN: usize = 20usize;
22879 pub const DEFAULT: Self = Self {
22880 time_boot_ms: 0_u32,
22881 roll: 0.0_f32,
22882 pitch: 0.0_f32,
22883 yaw: 0.0_f32,
22884 yaw_absolute: 0.0_f32,
22885 };
22886 #[cfg(feature = "arbitrary")]
22887 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22888 use arbitrary::{Arbitrary, Unstructured};
22889 let mut buf = [0u8; 1024];
22890 rng.fill_bytes(&mut buf);
22891 let mut unstructured = Unstructured::new(&buf);
22892 Self::arbitrary(&mut unstructured).unwrap_or_default()
22893 }
22894}
22895impl Default for MOUNT_ORIENTATION_DATA {
22896 fn default() -> Self {
22897 Self::DEFAULT.clone()
22898 }
22899}
22900impl MessageData for MOUNT_ORIENTATION_DATA {
22901 type Message = MavMessage;
22902 const ID: u32 = 265u32;
22903 const NAME: &'static str = "MOUNT_ORIENTATION";
22904 const EXTRA_CRC: u8 = 26u8;
22905 const ENCODED_LEN: usize = 20usize;
22906 fn deser(
22907 _version: MavlinkVersion,
22908 __input: &[u8],
22909 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22910 let avail_len = __input.len();
22911 let mut payload_buf = [0; Self::ENCODED_LEN];
22912 let mut buf = if avail_len < Self::ENCODED_LEN {
22913 payload_buf[0..avail_len].copy_from_slice(__input);
22914 Bytes::new(&payload_buf)
22915 } else {
22916 Bytes::new(__input)
22917 };
22918 let mut __struct = Self::default();
22919 __struct.time_boot_ms = buf.get_u32_le()?;
22920 __struct.roll = buf.get_f32_le()?;
22921 __struct.pitch = buf.get_f32_le()?;
22922 __struct.yaw = buf.get_f32_le()?;
22923 __struct.yaw_absolute = buf.get_f32_le()?;
22924 Ok(__struct)
22925 }
22926 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22927 let mut __tmp = BytesMut::new(bytes);
22928 #[allow(clippy::absurd_extreme_comparisons)]
22929 #[allow(unused_comparisons)]
22930 if __tmp.remaining() < Self::ENCODED_LEN {
22931 panic!(
22932 "buffer is too small (need {} bytes, but got {})",
22933 Self::ENCODED_LEN,
22934 __tmp.remaining(),
22935 )
22936 }
22937 __tmp.put_u32_le(self.time_boot_ms);
22938 __tmp.put_f32_le(self.roll);
22939 __tmp.put_f32_le(self.pitch);
22940 __tmp.put_f32_le(self.yaw);
22941 if matches!(version, MavlinkVersion::V2) {
22942 __tmp.put_f32_le(self.yaw_absolute);
22943 let len = __tmp.len();
22944 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22945 } else {
22946 __tmp.len()
22947 }
22948 }
22949}
22950#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
22951#[doc = ""]
22952#[doc = "ID: 251"]
22953#[derive(Debug, Clone, PartialEq)]
22954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22956#[cfg_attr(feature = "ts", derive(TS))]
22957#[cfg_attr(feature = "ts", ts(export))]
22958pub struct NAMED_VALUE_FLOAT_DATA {
22959 #[doc = "Timestamp (time since system boot)."]
22960 pub time_boot_ms: u32,
22961 #[doc = "Floating point value"]
22962 pub value: f32,
22963 #[doc = "Name of the debug variable"]
22964 #[cfg_attr(feature = "ts", ts(type = "string"))]
22965 pub name: CharArray<10>,
22966}
22967impl NAMED_VALUE_FLOAT_DATA {
22968 pub const ENCODED_LEN: usize = 18usize;
22969 pub const DEFAULT: Self = Self {
22970 time_boot_ms: 0_u32,
22971 value: 0.0_f32,
22972 name: CharArray::new([0_u8; 10usize]),
22973 };
22974 #[cfg(feature = "arbitrary")]
22975 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22976 use arbitrary::{Arbitrary, Unstructured};
22977 let mut buf = [0u8; 1024];
22978 rng.fill_bytes(&mut buf);
22979 let mut unstructured = Unstructured::new(&buf);
22980 Self::arbitrary(&mut unstructured).unwrap_or_default()
22981 }
22982}
22983impl Default for NAMED_VALUE_FLOAT_DATA {
22984 fn default() -> Self {
22985 Self::DEFAULT.clone()
22986 }
22987}
22988impl MessageData for NAMED_VALUE_FLOAT_DATA {
22989 type Message = MavMessage;
22990 const ID: u32 = 251u32;
22991 const NAME: &'static str = "NAMED_VALUE_FLOAT";
22992 const EXTRA_CRC: u8 = 170u8;
22993 const ENCODED_LEN: usize = 18usize;
22994 fn deser(
22995 _version: MavlinkVersion,
22996 __input: &[u8],
22997 ) -> Result<Self, ::mavlink_core::error::ParserError> {
22998 let avail_len = __input.len();
22999 let mut payload_buf = [0; Self::ENCODED_LEN];
23000 let mut buf = if avail_len < Self::ENCODED_LEN {
23001 payload_buf[0..avail_len].copy_from_slice(__input);
23002 Bytes::new(&payload_buf)
23003 } else {
23004 Bytes::new(__input)
23005 };
23006 let mut __struct = Self::default();
23007 __struct.time_boot_ms = buf.get_u32_le()?;
23008 __struct.value = buf.get_f32_le()?;
23009 let mut tmp = [0_u8; 10usize];
23010 for v in &mut tmp {
23011 *v = buf.get_u8()?;
23012 }
23013 __struct.name = CharArray::new(tmp);
23014 Ok(__struct)
23015 }
23016 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23017 let mut __tmp = BytesMut::new(bytes);
23018 #[allow(clippy::absurd_extreme_comparisons)]
23019 #[allow(unused_comparisons)]
23020 if __tmp.remaining() < Self::ENCODED_LEN {
23021 panic!(
23022 "buffer is too small (need {} bytes, but got {})",
23023 Self::ENCODED_LEN,
23024 __tmp.remaining(),
23025 )
23026 }
23027 __tmp.put_u32_le(self.time_boot_ms);
23028 __tmp.put_f32_le(self.value);
23029 for val in &self.name {
23030 __tmp.put_u8(*val);
23031 }
23032 if matches!(version, MavlinkVersion::V2) {
23033 let len = __tmp.len();
23034 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23035 } else {
23036 __tmp.len()
23037 }
23038 }
23039}
23040#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
23041#[doc = ""]
23042#[doc = "ID: 252"]
23043#[derive(Debug, Clone, PartialEq)]
23044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23046#[cfg_attr(feature = "ts", derive(TS))]
23047#[cfg_attr(feature = "ts", ts(export))]
23048pub struct NAMED_VALUE_INT_DATA {
23049 #[doc = "Timestamp (time since system boot)."]
23050 pub time_boot_ms: u32,
23051 #[doc = "Signed integer value"]
23052 pub value: i32,
23053 #[doc = "Name of the debug variable"]
23054 #[cfg_attr(feature = "ts", ts(type = "string"))]
23055 pub name: CharArray<10>,
23056}
23057impl NAMED_VALUE_INT_DATA {
23058 pub const ENCODED_LEN: usize = 18usize;
23059 pub const DEFAULT: Self = Self {
23060 time_boot_ms: 0_u32,
23061 value: 0_i32,
23062 name: CharArray::new([0_u8; 10usize]),
23063 };
23064 #[cfg(feature = "arbitrary")]
23065 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23066 use arbitrary::{Arbitrary, Unstructured};
23067 let mut buf = [0u8; 1024];
23068 rng.fill_bytes(&mut buf);
23069 let mut unstructured = Unstructured::new(&buf);
23070 Self::arbitrary(&mut unstructured).unwrap_or_default()
23071 }
23072}
23073impl Default for NAMED_VALUE_INT_DATA {
23074 fn default() -> Self {
23075 Self::DEFAULT.clone()
23076 }
23077}
23078impl MessageData for NAMED_VALUE_INT_DATA {
23079 type Message = MavMessage;
23080 const ID: u32 = 252u32;
23081 const NAME: &'static str = "NAMED_VALUE_INT";
23082 const EXTRA_CRC: u8 = 44u8;
23083 const ENCODED_LEN: usize = 18usize;
23084 fn deser(
23085 _version: MavlinkVersion,
23086 __input: &[u8],
23087 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23088 let avail_len = __input.len();
23089 let mut payload_buf = [0; Self::ENCODED_LEN];
23090 let mut buf = if avail_len < Self::ENCODED_LEN {
23091 payload_buf[0..avail_len].copy_from_slice(__input);
23092 Bytes::new(&payload_buf)
23093 } else {
23094 Bytes::new(__input)
23095 };
23096 let mut __struct = Self::default();
23097 __struct.time_boot_ms = buf.get_u32_le()?;
23098 __struct.value = buf.get_i32_le()?;
23099 let mut tmp = [0_u8; 10usize];
23100 for v in &mut tmp {
23101 *v = buf.get_u8()?;
23102 }
23103 __struct.name = CharArray::new(tmp);
23104 Ok(__struct)
23105 }
23106 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23107 let mut __tmp = BytesMut::new(bytes);
23108 #[allow(clippy::absurd_extreme_comparisons)]
23109 #[allow(unused_comparisons)]
23110 if __tmp.remaining() < Self::ENCODED_LEN {
23111 panic!(
23112 "buffer is too small (need {} bytes, but got {})",
23113 Self::ENCODED_LEN,
23114 __tmp.remaining(),
23115 )
23116 }
23117 __tmp.put_u32_le(self.time_boot_ms);
23118 __tmp.put_i32_le(self.value);
23119 for val in &self.name {
23120 __tmp.put_u8(*val);
23121 }
23122 if matches!(version, MavlinkVersion::V2) {
23123 let len = __tmp.len();
23124 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23125 } else {
23126 __tmp.len()
23127 }
23128 }
23129}
23130#[doc = "The state of the navigation and position controller."]
23131#[doc = ""]
23132#[doc = "ID: 62"]
23133#[derive(Debug, Clone, PartialEq)]
23134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23136#[cfg_attr(feature = "ts", derive(TS))]
23137#[cfg_attr(feature = "ts", ts(export))]
23138pub struct NAV_CONTROLLER_OUTPUT_DATA {
23139 #[doc = "Current desired roll"]
23140 pub nav_roll: f32,
23141 #[doc = "Current desired pitch"]
23142 pub nav_pitch: f32,
23143 #[doc = "Current altitude error"]
23144 pub alt_error: f32,
23145 #[doc = "Current airspeed error"]
23146 pub aspd_error: f32,
23147 #[doc = "Current crosstrack error on x-y plane"]
23148 pub xtrack_error: f32,
23149 #[doc = "Current desired heading"]
23150 pub nav_bearing: i16,
23151 #[doc = "Bearing to current waypoint/target"]
23152 pub target_bearing: i16,
23153 #[doc = "Distance to active waypoint"]
23154 pub wp_dist: u16,
23155}
23156impl NAV_CONTROLLER_OUTPUT_DATA {
23157 pub const ENCODED_LEN: usize = 26usize;
23158 pub const DEFAULT: Self = Self {
23159 nav_roll: 0.0_f32,
23160 nav_pitch: 0.0_f32,
23161 alt_error: 0.0_f32,
23162 aspd_error: 0.0_f32,
23163 xtrack_error: 0.0_f32,
23164 nav_bearing: 0_i16,
23165 target_bearing: 0_i16,
23166 wp_dist: 0_u16,
23167 };
23168 #[cfg(feature = "arbitrary")]
23169 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23170 use arbitrary::{Arbitrary, Unstructured};
23171 let mut buf = [0u8; 1024];
23172 rng.fill_bytes(&mut buf);
23173 let mut unstructured = Unstructured::new(&buf);
23174 Self::arbitrary(&mut unstructured).unwrap_or_default()
23175 }
23176}
23177impl Default for NAV_CONTROLLER_OUTPUT_DATA {
23178 fn default() -> Self {
23179 Self::DEFAULT.clone()
23180 }
23181}
23182impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
23183 type Message = MavMessage;
23184 const ID: u32 = 62u32;
23185 const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
23186 const EXTRA_CRC: u8 = 183u8;
23187 const ENCODED_LEN: usize = 26usize;
23188 fn deser(
23189 _version: MavlinkVersion,
23190 __input: &[u8],
23191 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23192 let avail_len = __input.len();
23193 let mut payload_buf = [0; Self::ENCODED_LEN];
23194 let mut buf = if avail_len < Self::ENCODED_LEN {
23195 payload_buf[0..avail_len].copy_from_slice(__input);
23196 Bytes::new(&payload_buf)
23197 } else {
23198 Bytes::new(__input)
23199 };
23200 let mut __struct = Self::default();
23201 __struct.nav_roll = buf.get_f32_le()?;
23202 __struct.nav_pitch = buf.get_f32_le()?;
23203 __struct.alt_error = buf.get_f32_le()?;
23204 __struct.aspd_error = buf.get_f32_le()?;
23205 __struct.xtrack_error = buf.get_f32_le()?;
23206 __struct.nav_bearing = buf.get_i16_le()?;
23207 __struct.target_bearing = buf.get_i16_le()?;
23208 __struct.wp_dist = buf.get_u16_le()?;
23209 Ok(__struct)
23210 }
23211 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23212 let mut __tmp = BytesMut::new(bytes);
23213 #[allow(clippy::absurd_extreme_comparisons)]
23214 #[allow(unused_comparisons)]
23215 if __tmp.remaining() < Self::ENCODED_LEN {
23216 panic!(
23217 "buffer is too small (need {} bytes, but got {})",
23218 Self::ENCODED_LEN,
23219 __tmp.remaining(),
23220 )
23221 }
23222 __tmp.put_f32_le(self.nav_roll);
23223 __tmp.put_f32_le(self.nav_pitch);
23224 __tmp.put_f32_le(self.alt_error);
23225 __tmp.put_f32_le(self.aspd_error);
23226 __tmp.put_f32_le(self.xtrack_error);
23227 __tmp.put_i16_le(self.nav_bearing);
23228 __tmp.put_i16_le(self.target_bearing);
23229 __tmp.put_u16_le(self.wp_dist);
23230 if matches!(version, MavlinkVersion::V2) {
23231 let len = __tmp.len();
23232 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23233 } else {
23234 __tmp.len()
23235 }
23236 }
23237}
23238#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
23239#[doc = ""]
23240#[doc = "ID: 330"]
23241#[derive(Debug, Clone, PartialEq)]
23242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23244#[cfg_attr(feature = "ts", derive(TS))]
23245#[cfg_attr(feature = "ts", ts(export))]
23246pub struct OBSTACLE_DISTANCE_DATA {
23247 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23248 pub time_usec: u64,
23249 #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
23250 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23251 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23252 pub distances: [u16; 72],
23253 #[doc = "Minimum distance the sensor can measure."]
23254 pub min_distance: u16,
23255 #[doc = "Maximum distance the sensor can measure."]
23256 pub max_distance: u16,
23257 #[doc = "Class id of the distance sensor type."]
23258 pub sensor_type: MavDistanceSensor,
23259 #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
23260 pub increment: u8,
23261 #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
23262 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23263 pub increment_f: f32,
23264 #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
23265 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23266 pub angle_offset: f32,
23267 #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
23268 #[cfg_attr(feature = "serde", serde(default))]
23269 pub frame: MavFrame,
23270}
23271impl OBSTACLE_DISTANCE_DATA {
23272 pub const ENCODED_LEN: usize = 167usize;
23273 pub const DEFAULT: Self = Self {
23274 time_usec: 0_u64,
23275 distances: [0_u16; 72usize],
23276 min_distance: 0_u16,
23277 max_distance: 0_u16,
23278 sensor_type: MavDistanceSensor::DEFAULT,
23279 increment: 0_u8,
23280 increment_f: 0.0_f32,
23281 angle_offset: 0.0_f32,
23282 frame: MavFrame::DEFAULT,
23283 };
23284 #[cfg(feature = "arbitrary")]
23285 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23286 use arbitrary::{Arbitrary, Unstructured};
23287 let mut buf = [0u8; 1024];
23288 rng.fill_bytes(&mut buf);
23289 let mut unstructured = Unstructured::new(&buf);
23290 Self::arbitrary(&mut unstructured).unwrap_or_default()
23291 }
23292}
23293impl Default for OBSTACLE_DISTANCE_DATA {
23294 fn default() -> Self {
23295 Self::DEFAULT.clone()
23296 }
23297}
23298impl MessageData for OBSTACLE_DISTANCE_DATA {
23299 type Message = MavMessage;
23300 const ID: u32 = 330u32;
23301 const NAME: &'static str = "OBSTACLE_DISTANCE";
23302 const EXTRA_CRC: u8 = 23u8;
23303 const ENCODED_LEN: usize = 167usize;
23304 fn deser(
23305 _version: MavlinkVersion,
23306 __input: &[u8],
23307 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23308 let avail_len = __input.len();
23309 let mut payload_buf = [0; Self::ENCODED_LEN];
23310 let mut buf = if avail_len < Self::ENCODED_LEN {
23311 payload_buf[0..avail_len].copy_from_slice(__input);
23312 Bytes::new(&payload_buf)
23313 } else {
23314 Bytes::new(__input)
23315 };
23316 let mut __struct = Self::default();
23317 __struct.time_usec = buf.get_u64_le()?;
23318 for v in &mut __struct.distances {
23319 let val = buf.get_u16_le()?;
23320 *v = val;
23321 }
23322 __struct.min_distance = buf.get_u16_le()?;
23323 __struct.max_distance = buf.get_u16_le()?;
23324 let tmp = buf.get_u8()?;
23325 __struct.sensor_type =
23326 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23327 enum_type: "MavDistanceSensor",
23328 value: tmp as u64,
23329 })?;
23330 __struct.increment = buf.get_u8()?;
23331 __struct.increment_f = buf.get_f32_le()?;
23332 __struct.angle_offset = buf.get_f32_le()?;
23333 let tmp = buf.get_u8()?;
23334 __struct.frame =
23335 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23336 enum_type: "MavFrame",
23337 value: tmp as u64,
23338 })?;
23339 Ok(__struct)
23340 }
23341 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23342 let mut __tmp = BytesMut::new(bytes);
23343 #[allow(clippy::absurd_extreme_comparisons)]
23344 #[allow(unused_comparisons)]
23345 if __tmp.remaining() < Self::ENCODED_LEN {
23346 panic!(
23347 "buffer is too small (need {} bytes, but got {})",
23348 Self::ENCODED_LEN,
23349 __tmp.remaining(),
23350 )
23351 }
23352 __tmp.put_u64_le(self.time_usec);
23353 for val in &self.distances {
23354 __tmp.put_u16_le(*val);
23355 }
23356 __tmp.put_u16_le(self.min_distance);
23357 __tmp.put_u16_le(self.max_distance);
23358 __tmp.put_u8(self.sensor_type as u8);
23359 __tmp.put_u8(self.increment);
23360 if matches!(version, MavlinkVersion::V2) {
23361 __tmp.put_f32_le(self.increment_f);
23362 __tmp.put_f32_le(self.angle_offset);
23363 __tmp.put_u8(self.frame as u8);
23364 let len = __tmp.len();
23365 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23366 } else {
23367 __tmp.len()
23368 }
23369 }
23370}
23371#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
23372#[doc = ""]
23373#[doc = "ID: 331"]
23374#[derive(Debug, Clone, PartialEq)]
23375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23377#[cfg_attr(feature = "ts", derive(TS))]
23378#[cfg_attr(feature = "ts", ts(export))]
23379pub struct ODOMETRY_DATA {
23380 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23381 pub time_usec: u64,
23382 #[doc = "X Position"]
23383 pub x: f32,
23384 #[doc = "Y Position"]
23385 pub y: f32,
23386 #[doc = "Z Position"]
23387 pub z: f32,
23388 #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
23389 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23390 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23391 pub q: [f32; 4],
23392 #[doc = "X linear speed"]
23393 pub vx: f32,
23394 #[doc = "Y linear speed"]
23395 pub vy: f32,
23396 #[doc = "Z linear speed"]
23397 pub vz: f32,
23398 #[doc = "Roll angular speed"]
23399 pub rollspeed: f32,
23400 #[doc = "Pitch angular speed"]
23401 pub pitchspeed: f32,
23402 #[doc = "Yaw angular speed"]
23403 pub yawspeed: f32,
23404 #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
23405 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23406 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23407 pub pose_covariance: [f32; 21],
23408 #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
23409 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23410 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23411 pub velocity_covariance: [f32; 21],
23412 #[doc = "Coordinate frame of reference for the pose data."]
23413 pub frame_id: MavFrame,
23414 #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
23415 pub child_frame_id: MavFrame,
23416 #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
23417 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23418 pub reset_counter: u8,
23419 #[doc = "Type of estimator that is providing the odometry."]
23420 #[cfg_attr(feature = "serde", serde(default))]
23421 pub estimator_type: MavEstimatorType,
23422 #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
23423 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23424 pub quality: i8,
23425}
23426impl ODOMETRY_DATA {
23427 pub const ENCODED_LEN: usize = 233usize;
23428 pub const DEFAULT: Self = Self {
23429 time_usec: 0_u64,
23430 x: 0.0_f32,
23431 y: 0.0_f32,
23432 z: 0.0_f32,
23433 q: [0.0_f32; 4usize],
23434 vx: 0.0_f32,
23435 vy: 0.0_f32,
23436 vz: 0.0_f32,
23437 rollspeed: 0.0_f32,
23438 pitchspeed: 0.0_f32,
23439 yawspeed: 0.0_f32,
23440 pose_covariance: [0.0_f32; 21usize],
23441 velocity_covariance: [0.0_f32; 21usize],
23442 frame_id: MavFrame::DEFAULT,
23443 child_frame_id: MavFrame::DEFAULT,
23444 reset_counter: 0_u8,
23445 estimator_type: MavEstimatorType::DEFAULT,
23446 quality: 0_i8,
23447 };
23448 #[cfg(feature = "arbitrary")]
23449 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23450 use arbitrary::{Arbitrary, Unstructured};
23451 let mut buf = [0u8; 1024];
23452 rng.fill_bytes(&mut buf);
23453 let mut unstructured = Unstructured::new(&buf);
23454 Self::arbitrary(&mut unstructured).unwrap_or_default()
23455 }
23456}
23457impl Default for ODOMETRY_DATA {
23458 fn default() -> Self {
23459 Self::DEFAULT.clone()
23460 }
23461}
23462impl MessageData for ODOMETRY_DATA {
23463 type Message = MavMessage;
23464 const ID: u32 = 331u32;
23465 const NAME: &'static str = "ODOMETRY";
23466 const EXTRA_CRC: u8 = 91u8;
23467 const ENCODED_LEN: usize = 233usize;
23468 fn deser(
23469 _version: MavlinkVersion,
23470 __input: &[u8],
23471 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23472 let avail_len = __input.len();
23473 let mut payload_buf = [0; Self::ENCODED_LEN];
23474 let mut buf = if avail_len < Self::ENCODED_LEN {
23475 payload_buf[0..avail_len].copy_from_slice(__input);
23476 Bytes::new(&payload_buf)
23477 } else {
23478 Bytes::new(__input)
23479 };
23480 let mut __struct = Self::default();
23481 __struct.time_usec = buf.get_u64_le()?;
23482 __struct.x = buf.get_f32_le()?;
23483 __struct.y = buf.get_f32_le()?;
23484 __struct.z = buf.get_f32_le()?;
23485 for v in &mut __struct.q {
23486 let val = buf.get_f32_le()?;
23487 *v = val;
23488 }
23489 __struct.vx = buf.get_f32_le()?;
23490 __struct.vy = buf.get_f32_le()?;
23491 __struct.vz = buf.get_f32_le()?;
23492 __struct.rollspeed = buf.get_f32_le()?;
23493 __struct.pitchspeed = buf.get_f32_le()?;
23494 __struct.yawspeed = buf.get_f32_le()?;
23495 for v in &mut __struct.pose_covariance {
23496 let val = buf.get_f32_le()?;
23497 *v = val;
23498 }
23499 for v in &mut __struct.velocity_covariance {
23500 let val = buf.get_f32_le()?;
23501 *v = val;
23502 }
23503 let tmp = buf.get_u8()?;
23504 __struct.frame_id =
23505 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23506 enum_type: "MavFrame",
23507 value: tmp as u64,
23508 })?;
23509 let tmp = buf.get_u8()?;
23510 __struct.child_frame_id =
23511 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23512 enum_type: "MavFrame",
23513 value: tmp as u64,
23514 })?;
23515 __struct.reset_counter = buf.get_u8()?;
23516 let tmp = buf.get_u8()?;
23517 __struct.estimator_type =
23518 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23519 enum_type: "MavEstimatorType",
23520 value: tmp as u64,
23521 })?;
23522 __struct.quality = buf.get_i8()?;
23523 Ok(__struct)
23524 }
23525 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23526 let mut __tmp = BytesMut::new(bytes);
23527 #[allow(clippy::absurd_extreme_comparisons)]
23528 #[allow(unused_comparisons)]
23529 if __tmp.remaining() < Self::ENCODED_LEN {
23530 panic!(
23531 "buffer is too small (need {} bytes, but got {})",
23532 Self::ENCODED_LEN,
23533 __tmp.remaining(),
23534 )
23535 }
23536 __tmp.put_u64_le(self.time_usec);
23537 __tmp.put_f32_le(self.x);
23538 __tmp.put_f32_le(self.y);
23539 __tmp.put_f32_le(self.z);
23540 for val in &self.q {
23541 __tmp.put_f32_le(*val);
23542 }
23543 __tmp.put_f32_le(self.vx);
23544 __tmp.put_f32_le(self.vy);
23545 __tmp.put_f32_le(self.vz);
23546 __tmp.put_f32_le(self.rollspeed);
23547 __tmp.put_f32_le(self.pitchspeed);
23548 __tmp.put_f32_le(self.yawspeed);
23549 for val in &self.pose_covariance {
23550 __tmp.put_f32_le(*val);
23551 }
23552 for val in &self.velocity_covariance {
23553 __tmp.put_f32_le(*val);
23554 }
23555 __tmp.put_u8(self.frame_id as u8);
23556 __tmp.put_u8(self.child_frame_id as u8);
23557 if matches!(version, MavlinkVersion::V2) {
23558 __tmp.put_u8(self.reset_counter);
23559 __tmp.put_u8(self.estimator_type as u8);
23560 __tmp.put_i8(self.quality);
23561 let len = __tmp.len();
23562 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23563 } else {
23564 __tmp.len()
23565 }
23566 }
23567}
23568#[doc = "Hardware status sent by an onboard computer."]
23569#[doc = ""]
23570#[doc = "ID: 390"]
23571#[derive(Debug, Clone, PartialEq)]
23572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23574#[cfg_attr(feature = "ts", derive(TS))]
23575#[cfg_attr(feature = "ts", ts(export))]
23576pub struct ONBOARD_COMPUTER_STATUS_DATA {
23577 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23578 pub time_usec: u64,
23579 #[doc = "Time since system boot."]
23580 pub uptime: u32,
23581 #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
23582 pub ram_usage: u32,
23583 #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
23584 pub ram_total: u32,
23585 #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
23586 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23587 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23588 pub storage_type: [u32; 4],
23589 #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
23590 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23591 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23592 pub storage_usage: [u32; 4],
23593 #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
23594 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23595 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23596 pub storage_total: [u32; 4],
23597 #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
23598 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23599 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23600 pub link_type: [u32; 6],
23601 #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
23602 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23603 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23604 pub link_tx_rate: [u32; 6],
23605 #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
23606 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23607 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23608 pub link_rx_rate: [u32; 6],
23609 #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
23610 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23611 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23612 pub link_tx_max: [u32; 6],
23613 #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
23614 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23615 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23616 pub link_rx_max: [u32; 6],
23617 #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
23618 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23619 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23620 pub fan_speed: [i16; 4],
23621 #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
23622 pub mavtype: u8,
23623 #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
23624 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23625 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23626 pub cpu_cores: [u8; 8],
23627 #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
23628 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23629 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23630 pub cpu_combined: [u8; 10],
23631 #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
23632 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23633 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23634 pub gpu_cores: [u8; 4],
23635 #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
23636 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23637 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23638 pub gpu_combined: [u8; 10],
23639 #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
23640 pub temperature_board: i8,
23641 #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
23642 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23643 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23644 pub temperature_core: [i8; 8],
23645 #[doc = "Bitmap of status flags."]
23646 #[cfg_attr(feature = "serde", serde(default))]
23647 pub status_flags: ComputerStatusFlags,
23648}
23649impl ONBOARD_COMPUTER_STATUS_DATA {
23650 pub const ENCODED_LEN: usize = 240usize;
23651 pub const DEFAULT: Self = Self {
23652 time_usec: 0_u64,
23653 uptime: 0_u32,
23654 ram_usage: 0_u32,
23655 ram_total: 0_u32,
23656 storage_type: [0_u32; 4usize],
23657 storage_usage: [0_u32; 4usize],
23658 storage_total: [0_u32; 4usize],
23659 link_type: [0_u32; 6usize],
23660 link_tx_rate: [0_u32; 6usize],
23661 link_rx_rate: [0_u32; 6usize],
23662 link_tx_max: [0_u32; 6usize],
23663 link_rx_max: [0_u32; 6usize],
23664 fan_speed: [0_i16; 4usize],
23665 mavtype: 0_u8,
23666 cpu_cores: [0_u8; 8usize],
23667 cpu_combined: [0_u8; 10usize],
23668 gpu_cores: [0_u8; 4usize],
23669 gpu_combined: [0_u8; 10usize],
23670 temperature_board: 0_i8,
23671 temperature_core: [0_i8; 8usize],
23672 status_flags: ComputerStatusFlags::DEFAULT,
23673 };
23674 #[cfg(feature = "arbitrary")]
23675 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23676 use arbitrary::{Arbitrary, Unstructured};
23677 let mut buf = [0u8; 1024];
23678 rng.fill_bytes(&mut buf);
23679 let mut unstructured = Unstructured::new(&buf);
23680 Self::arbitrary(&mut unstructured).unwrap_or_default()
23681 }
23682}
23683impl Default for ONBOARD_COMPUTER_STATUS_DATA {
23684 fn default() -> Self {
23685 Self::DEFAULT.clone()
23686 }
23687}
23688impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
23689 type Message = MavMessage;
23690 const ID: u32 = 390u32;
23691 const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
23692 const EXTRA_CRC: u8 = 156u8;
23693 const ENCODED_LEN: usize = 240usize;
23694 fn deser(
23695 _version: MavlinkVersion,
23696 __input: &[u8],
23697 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23698 let avail_len = __input.len();
23699 let mut payload_buf = [0; Self::ENCODED_LEN];
23700 let mut buf = if avail_len < Self::ENCODED_LEN {
23701 payload_buf[0..avail_len].copy_from_slice(__input);
23702 Bytes::new(&payload_buf)
23703 } else {
23704 Bytes::new(__input)
23705 };
23706 let mut __struct = Self::default();
23707 __struct.time_usec = buf.get_u64_le()?;
23708 __struct.uptime = buf.get_u32_le()?;
23709 __struct.ram_usage = buf.get_u32_le()?;
23710 __struct.ram_total = buf.get_u32_le()?;
23711 for v in &mut __struct.storage_type {
23712 let val = buf.get_u32_le()?;
23713 *v = val;
23714 }
23715 for v in &mut __struct.storage_usage {
23716 let val = buf.get_u32_le()?;
23717 *v = val;
23718 }
23719 for v in &mut __struct.storage_total {
23720 let val = buf.get_u32_le()?;
23721 *v = val;
23722 }
23723 for v in &mut __struct.link_type {
23724 let val = buf.get_u32_le()?;
23725 *v = val;
23726 }
23727 for v in &mut __struct.link_tx_rate {
23728 let val = buf.get_u32_le()?;
23729 *v = val;
23730 }
23731 for v in &mut __struct.link_rx_rate {
23732 let val = buf.get_u32_le()?;
23733 *v = val;
23734 }
23735 for v in &mut __struct.link_tx_max {
23736 let val = buf.get_u32_le()?;
23737 *v = val;
23738 }
23739 for v in &mut __struct.link_rx_max {
23740 let val = buf.get_u32_le()?;
23741 *v = val;
23742 }
23743 for v in &mut __struct.fan_speed {
23744 let val = buf.get_i16_le()?;
23745 *v = val;
23746 }
23747 __struct.mavtype = buf.get_u8()?;
23748 for v in &mut __struct.cpu_cores {
23749 let val = buf.get_u8()?;
23750 *v = val;
23751 }
23752 for v in &mut __struct.cpu_combined {
23753 let val = buf.get_u8()?;
23754 *v = val;
23755 }
23756 for v in &mut __struct.gpu_cores {
23757 let val = buf.get_u8()?;
23758 *v = val;
23759 }
23760 for v in &mut __struct.gpu_combined {
23761 let val = buf.get_u8()?;
23762 *v = val;
23763 }
23764 __struct.temperature_board = buf.get_i8()?;
23765 for v in &mut __struct.temperature_core {
23766 let val = buf.get_i8()?;
23767 *v = val;
23768 }
23769 let tmp = buf.get_u16_le()?;
23770 __struct.status_flags = ComputerStatusFlags::from_bits(
23771 tmp as <ComputerStatusFlags as Flags>::Bits,
23772 )
23773 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23774 flag_type: "ComputerStatusFlags",
23775 value: tmp as u64,
23776 })?;
23777 Ok(__struct)
23778 }
23779 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23780 let mut __tmp = BytesMut::new(bytes);
23781 #[allow(clippy::absurd_extreme_comparisons)]
23782 #[allow(unused_comparisons)]
23783 if __tmp.remaining() < Self::ENCODED_LEN {
23784 panic!(
23785 "buffer is too small (need {} bytes, but got {})",
23786 Self::ENCODED_LEN,
23787 __tmp.remaining(),
23788 )
23789 }
23790 __tmp.put_u64_le(self.time_usec);
23791 __tmp.put_u32_le(self.uptime);
23792 __tmp.put_u32_le(self.ram_usage);
23793 __tmp.put_u32_le(self.ram_total);
23794 for val in &self.storage_type {
23795 __tmp.put_u32_le(*val);
23796 }
23797 for val in &self.storage_usage {
23798 __tmp.put_u32_le(*val);
23799 }
23800 for val in &self.storage_total {
23801 __tmp.put_u32_le(*val);
23802 }
23803 for val in &self.link_type {
23804 __tmp.put_u32_le(*val);
23805 }
23806 for val in &self.link_tx_rate {
23807 __tmp.put_u32_le(*val);
23808 }
23809 for val in &self.link_rx_rate {
23810 __tmp.put_u32_le(*val);
23811 }
23812 for val in &self.link_tx_max {
23813 __tmp.put_u32_le(*val);
23814 }
23815 for val in &self.link_rx_max {
23816 __tmp.put_u32_le(*val);
23817 }
23818 for val in &self.fan_speed {
23819 __tmp.put_i16_le(*val);
23820 }
23821 __tmp.put_u8(self.mavtype);
23822 for val in &self.cpu_cores {
23823 __tmp.put_u8(*val);
23824 }
23825 for val in &self.cpu_combined {
23826 __tmp.put_u8(*val);
23827 }
23828 for val in &self.gpu_cores {
23829 __tmp.put_u8(*val);
23830 }
23831 for val in &self.gpu_combined {
23832 __tmp.put_u8(*val);
23833 }
23834 __tmp.put_i8(self.temperature_board);
23835 for val in &self.temperature_core {
23836 __tmp.put_i8(*val);
23837 }
23838 if matches!(version, MavlinkVersion::V2) {
23839 __tmp.put_u16_le(self.status_flags.bits() as u16);
23840 let len = __tmp.len();
23841 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23842 } else {
23843 __tmp.len()
23844 }
23845 }
23846}
23847#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
23848#[doc = ""]
23849#[doc = "ID: 12918"]
23850#[derive(Debug, Clone, PartialEq)]
23851#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23853#[cfg_attr(feature = "ts", derive(TS))]
23854#[cfg_attr(feature = "ts", ts(export))]
23855pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
23856 #[doc = "Status level indicating if arming is allowed."]
23857 pub status: MavOdidArmStatus,
23858 #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
23859 #[cfg_attr(feature = "ts", ts(type = "string"))]
23860 pub error: CharArray<50>,
23861}
23862impl OPEN_DRONE_ID_ARM_STATUS_DATA {
23863 pub const ENCODED_LEN: usize = 51usize;
23864 pub const DEFAULT: Self = Self {
23865 status: MavOdidArmStatus::DEFAULT,
23866 error: CharArray::new([0_u8; 50usize]),
23867 };
23868 #[cfg(feature = "arbitrary")]
23869 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23870 use arbitrary::{Arbitrary, Unstructured};
23871 let mut buf = [0u8; 1024];
23872 rng.fill_bytes(&mut buf);
23873 let mut unstructured = Unstructured::new(&buf);
23874 Self::arbitrary(&mut unstructured).unwrap_or_default()
23875 }
23876}
23877impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
23878 fn default() -> Self {
23879 Self::DEFAULT.clone()
23880 }
23881}
23882impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
23883 type Message = MavMessage;
23884 const ID: u32 = 12918u32;
23885 const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
23886 const EXTRA_CRC: u8 = 139u8;
23887 const ENCODED_LEN: usize = 51usize;
23888 fn deser(
23889 _version: MavlinkVersion,
23890 __input: &[u8],
23891 ) -> Result<Self, ::mavlink_core::error::ParserError> {
23892 let avail_len = __input.len();
23893 let mut payload_buf = [0; Self::ENCODED_LEN];
23894 let mut buf = if avail_len < Self::ENCODED_LEN {
23895 payload_buf[0..avail_len].copy_from_slice(__input);
23896 Bytes::new(&payload_buf)
23897 } else {
23898 Bytes::new(__input)
23899 };
23900 let mut __struct = Self::default();
23901 let tmp = buf.get_u8()?;
23902 __struct.status =
23903 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23904 enum_type: "MavOdidArmStatus",
23905 value: tmp as u64,
23906 })?;
23907 let mut tmp = [0_u8; 50usize];
23908 for v in &mut tmp {
23909 *v = buf.get_u8()?;
23910 }
23911 __struct.error = CharArray::new(tmp);
23912 Ok(__struct)
23913 }
23914 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23915 let mut __tmp = BytesMut::new(bytes);
23916 #[allow(clippy::absurd_extreme_comparisons)]
23917 #[allow(unused_comparisons)]
23918 if __tmp.remaining() < Self::ENCODED_LEN {
23919 panic!(
23920 "buffer is too small (need {} bytes, but got {})",
23921 Self::ENCODED_LEN,
23922 __tmp.remaining(),
23923 )
23924 }
23925 __tmp.put_u8(self.status as u8);
23926 for val in &self.error {
23927 __tmp.put_u8(*val);
23928 }
23929 if matches!(version, MavlinkVersion::V2) {
23930 let len = __tmp.len();
23931 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23932 } else {
23933 __tmp.len()
23934 }
23935 }
23936}
23937#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
23938#[doc = ""]
23939#[doc = "ID: 12902"]
23940#[derive(Debug, Clone, PartialEq)]
23941#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23943#[cfg_attr(feature = "ts", derive(TS))]
23944#[cfg_attr(feature = "ts", ts(export))]
23945pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
23946 #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23947 pub timestamp: u32,
23948 #[doc = "System ID (0 for broadcast)."]
23949 pub target_system: u8,
23950 #[doc = "Component ID (0 for broadcast)."]
23951 pub target_component: u8,
23952 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23953 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23954 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23955 pub id_or_mac: [u8; 20],
23956 #[doc = "Indicates the type of authentication."]
23957 pub authentication_type: MavOdidAuthType,
23958 #[doc = "Allowed range is 0 - 15."]
23959 pub data_page: u8,
23960 #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
23961 pub last_page_index: u8,
23962 #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
23963 pub length: u8,
23964 #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
23965 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23966 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23967 pub authentication_data: [u8; 23],
23968}
23969impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
23970 pub const ENCODED_LEN: usize = 53usize;
23971 pub const DEFAULT: Self = Self {
23972 timestamp: 0_u32,
23973 target_system: 0_u8,
23974 target_component: 0_u8,
23975 id_or_mac: [0_u8; 20usize],
23976 authentication_type: MavOdidAuthType::DEFAULT,
23977 data_page: 0_u8,
23978 last_page_index: 0_u8,
23979 length: 0_u8,
23980 authentication_data: [0_u8; 23usize],
23981 };
23982 #[cfg(feature = "arbitrary")]
23983 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23984 use arbitrary::{Arbitrary, Unstructured};
23985 let mut buf = [0u8; 1024];
23986 rng.fill_bytes(&mut buf);
23987 let mut unstructured = Unstructured::new(&buf);
23988 Self::arbitrary(&mut unstructured).unwrap_or_default()
23989 }
23990}
23991impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
23992 fn default() -> Self {
23993 Self::DEFAULT.clone()
23994 }
23995}
23996impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
23997 type Message = MavMessage;
23998 const ID: u32 = 12902u32;
23999 const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
24000 const EXTRA_CRC: u8 = 140u8;
24001 const ENCODED_LEN: usize = 53usize;
24002 fn deser(
24003 _version: MavlinkVersion,
24004 __input: &[u8],
24005 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24006 let avail_len = __input.len();
24007 let mut payload_buf = [0; Self::ENCODED_LEN];
24008 let mut buf = if avail_len < Self::ENCODED_LEN {
24009 payload_buf[0..avail_len].copy_from_slice(__input);
24010 Bytes::new(&payload_buf)
24011 } else {
24012 Bytes::new(__input)
24013 };
24014 let mut __struct = Self::default();
24015 __struct.timestamp = buf.get_u32_le()?;
24016 __struct.target_system = buf.get_u8()?;
24017 __struct.target_component = buf.get_u8()?;
24018 for v in &mut __struct.id_or_mac {
24019 let val = buf.get_u8()?;
24020 *v = val;
24021 }
24022 let tmp = buf.get_u8()?;
24023 __struct.authentication_type =
24024 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24025 enum_type: "MavOdidAuthType",
24026 value: tmp as u64,
24027 })?;
24028 __struct.data_page = buf.get_u8()?;
24029 __struct.last_page_index = buf.get_u8()?;
24030 __struct.length = buf.get_u8()?;
24031 for v in &mut __struct.authentication_data {
24032 let val = buf.get_u8()?;
24033 *v = val;
24034 }
24035 Ok(__struct)
24036 }
24037 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24038 let mut __tmp = BytesMut::new(bytes);
24039 #[allow(clippy::absurd_extreme_comparisons)]
24040 #[allow(unused_comparisons)]
24041 if __tmp.remaining() < Self::ENCODED_LEN {
24042 panic!(
24043 "buffer is too small (need {} bytes, but got {})",
24044 Self::ENCODED_LEN,
24045 __tmp.remaining(),
24046 )
24047 }
24048 __tmp.put_u32_le(self.timestamp);
24049 __tmp.put_u8(self.target_system);
24050 __tmp.put_u8(self.target_component);
24051 for val in &self.id_or_mac {
24052 __tmp.put_u8(*val);
24053 }
24054 __tmp.put_u8(self.authentication_type as u8);
24055 __tmp.put_u8(self.data_page);
24056 __tmp.put_u8(self.last_page_index);
24057 __tmp.put_u8(self.length);
24058 for val in &self.authentication_data {
24059 __tmp.put_u8(*val);
24060 }
24061 if matches!(version, MavlinkVersion::V2) {
24062 let len = __tmp.len();
24063 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24064 } else {
24065 __tmp.len()
24066 }
24067 }
24068}
24069#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
24070#[doc = ""]
24071#[doc = "ID: 12900"]
24072#[derive(Debug, Clone, PartialEq)]
24073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24075#[cfg_attr(feature = "ts", derive(TS))]
24076#[cfg_attr(feature = "ts", ts(export))]
24077pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
24078 #[doc = "System ID (0 for broadcast)."]
24079 pub target_system: u8,
24080 #[doc = "Component ID (0 for broadcast)."]
24081 pub target_component: u8,
24082 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24083 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24084 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24085 pub id_or_mac: [u8; 20],
24086 #[doc = "Indicates the format for the uas_id field of this message."]
24087 pub id_type: MavOdidIdType,
24088 #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
24089 pub ua_type: MavOdidUaType,
24090 #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
24091 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24092 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24093 pub uas_id: [u8; 20],
24094}
24095impl OPEN_DRONE_ID_BASIC_ID_DATA {
24096 pub const ENCODED_LEN: usize = 44usize;
24097 pub const DEFAULT: Self = Self {
24098 target_system: 0_u8,
24099 target_component: 0_u8,
24100 id_or_mac: [0_u8; 20usize],
24101 id_type: MavOdidIdType::DEFAULT,
24102 ua_type: MavOdidUaType::DEFAULT,
24103 uas_id: [0_u8; 20usize],
24104 };
24105 #[cfg(feature = "arbitrary")]
24106 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24107 use arbitrary::{Arbitrary, Unstructured};
24108 let mut buf = [0u8; 1024];
24109 rng.fill_bytes(&mut buf);
24110 let mut unstructured = Unstructured::new(&buf);
24111 Self::arbitrary(&mut unstructured).unwrap_or_default()
24112 }
24113}
24114impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
24115 fn default() -> Self {
24116 Self::DEFAULT.clone()
24117 }
24118}
24119impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
24120 type Message = MavMessage;
24121 const ID: u32 = 12900u32;
24122 const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
24123 const EXTRA_CRC: u8 = 114u8;
24124 const ENCODED_LEN: usize = 44usize;
24125 fn deser(
24126 _version: MavlinkVersion,
24127 __input: &[u8],
24128 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24129 let avail_len = __input.len();
24130 let mut payload_buf = [0; Self::ENCODED_LEN];
24131 let mut buf = if avail_len < Self::ENCODED_LEN {
24132 payload_buf[0..avail_len].copy_from_slice(__input);
24133 Bytes::new(&payload_buf)
24134 } else {
24135 Bytes::new(__input)
24136 };
24137 let mut __struct = Self::default();
24138 __struct.target_system = buf.get_u8()?;
24139 __struct.target_component = buf.get_u8()?;
24140 for v in &mut __struct.id_or_mac {
24141 let val = buf.get_u8()?;
24142 *v = val;
24143 }
24144 let tmp = buf.get_u8()?;
24145 __struct.id_type =
24146 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24147 enum_type: "MavOdidIdType",
24148 value: tmp as u64,
24149 })?;
24150 let tmp = buf.get_u8()?;
24151 __struct.ua_type =
24152 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24153 enum_type: "MavOdidUaType",
24154 value: tmp as u64,
24155 })?;
24156 for v in &mut __struct.uas_id {
24157 let val = buf.get_u8()?;
24158 *v = val;
24159 }
24160 Ok(__struct)
24161 }
24162 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24163 let mut __tmp = BytesMut::new(bytes);
24164 #[allow(clippy::absurd_extreme_comparisons)]
24165 #[allow(unused_comparisons)]
24166 if __tmp.remaining() < Self::ENCODED_LEN {
24167 panic!(
24168 "buffer is too small (need {} bytes, but got {})",
24169 Self::ENCODED_LEN,
24170 __tmp.remaining(),
24171 )
24172 }
24173 __tmp.put_u8(self.target_system);
24174 __tmp.put_u8(self.target_component);
24175 for val in &self.id_or_mac {
24176 __tmp.put_u8(*val);
24177 }
24178 __tmp.put_u8(self.id_type as u8);
24179 __tmp.put_u8(self.ua_type as u8);
24180 for val in &self.uas_id {
24181 __tmp.put_u8(*val);
24182 }
24183 if matches!(version, MavlinkVersion::V2) {
24184 let len = __tmp.len();
24185 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24186 } else {
24187 __tmp.len()
24188 }
24189 }
24190}
24191#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
24192#[doc = ""]
24193#[doc = "ID: 12901"]
24194#[derive(Debug, Clone, PartialEq)]
24195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24197#[cfg_attr(feature = "ts", derive(TS))]
24198#[cfg_attr(feature = "ts", ts(export))]
24199pub struct OPEN_DRONE_ID_LOCATION_DATA {
24200 #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
24201 pub latitude: i32,
24202 #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
24203 pub longitude: i32,
24204 #[doc = "The altitude calculated from the barometric pressure. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
24205 pub altitude_barometric: f32,
24206 #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
24207 pub altitude_geodetic: f32,
24208 #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
24209 pub height: f32,
24210 #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
24211 pub timestamp: f32,
24212 #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
24213 pub direction: u16,
24214 #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
24215 pub speed_horizontal: u16,
24216 #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
24217 pub speed_vertical: i16,
24218 #[doc = "System ID (0 for broadcast)."]
24219 pub target_system: u8,
24220 #[doc = "Component ID (0 for broadcast)."]
24221 pub target_component: u8,
24222 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24223 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24224 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24225 pub id_or_mac: [u8; 20],
24226 #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
24227 pub status: MavOdidStatus,
24228 #[doc = "Indicates the reference point for the height field."]
24229 pub height_reference: MavOdidHeightRef,
24230 #[doc = "The accuracy of the horizontal position."]
24231 pub horizontal_accuracy: MavOdidHorAcc,
24232 #[doc = "The accuracy of the vertical position."]
24233 pub vertical_accuracy: MavOdidVerAcc,
24234 #[doc = "The accuracy of the barometric altitude."]
24235 pub barometer_accuracy: MavOdidVerAcc,
24236 #[doc = "The accuracy of the horizontal and vertical speed."]
24237 pub speed_accuracy: MavOdidSpeedAcc,
24238 #[doc = "The accuracy of the timestamps."]
24239 pub timestamp_accuracy: MavOdidTimeAcc,
24240}
24241impl OPEN_DRONE_ID_LOCATION_DATA {
24242 pub const ENCODED_LEN: usize = 59usize;
24243 pub const DEFAULT: Self = Self {
24244 latitude: 0_i32,
24245 longitude: 0_i32,
24246 altitude_barometric: 0.0_f32,
24247 altitude_geodetic: 0.0_f32,
24248 height: 0.0_f32,
24249 timestamp: 0.0_f32,
24250 direction: 0_u16,
24251 speed_horizontal: 0_u16,
24252 speed_vertical: 0_i16,
24253 target_system: 0_u8,
24254 target_component: 0_u8,
24255 id_or_mac: [0_u8; 20usize],
24256 status: MavOdidStatus::DEFAULT,
24257 height_reference: MavOdidHeightRef::DEFAULT,
24258 horizontal_accuracy: MavOdidHorAcc::DEFAULT,
24259 vertical_accuracy: MavOdidVerAcc::DEFAULT,
24260 barometer_accuracy: MavOdidVerAcc::DEFAULT,
24261 speed_accuracy: MavOdidSpeedAcc::DEFAULT,
24262 timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
24263 };
24264 #[cfg(feature = "arbitrary")]
24265 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24266 use arbitrary::{Arbitrary, Unstructured};
24267 let mut buf = [0u8; 1024];
24268 rng.fill_bytes(&mut buf);
24269 let mut unstructured = Unstructured::new(&buf);
24270 Self::arbitrary(&mut unstructured).unwrap_or_default()
24271 }
24272}
24273impl Default for OPEN_DRONE_ID_LOCATION_DATA {
24274 fn default() -> Self {
24275 Self::DEFAULT.clone()
24276 }
24277}
24278impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
24279 type Message = MavMessage;
24280 const ID: u32 = 12901u32;
24281 const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
24282 const EXTRA_CRC: u8 = 254u8;
24283 const ENCODED_LEN: usize = 59usize;
24284 fn deser(
24285 _version: MavlinkVersion,
24286 __input: &[u8],
24287 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24288 let avail_len = __input.len();
24289 let mut payload_buf = [0; Self::ENCODED_LEN];
24290 let mut buf = if avail_len < Self::ENCODED_LEN {
24291 payload_buf[0..avail_len].copy_from_slice(__input);
24292 Bytes::new(&payload_buf)
24293 } else {
24294 Bytes::new(__input)
24295 };
24296 let mut __struct = Self::default();
24297 __struct.latitude = buf.get_i32_le()?;
24298 __struct.longitude = buf.get_i32_le()?;
24299 __struct.altitude_barometric = buf.get_f32_le()?;
24300 __struct.altitude_geodetic = buf.get_f32_le()?;
24301 __struct.height = buf.get_f32_le()?;
24302 __struct.timestamp = buf.get_f32_le()?;
24303 __struct.direction = buf.get_u16_le()?;
24304 __struct.speed_horizontal = buf.get_u16_le()?;
24305 __struct.speed_vertical = buf.get_i16_le()?;
24306 __struct.target_system = buf.get_u8()?;
24307 __struct.target_component = buf.get_u8()?;
24308 for v in &mut __struct.id_or_mac {
24309 let val = buf.get_u8()?;
24310 *v = val;
24311 }
24312 let tmp = buf.get_u8()?;
24313 __struct.status =
24314 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24315 enum_type: "MavOdidStatus",
24316 value: tmp as u64,
24317 })?;
24318 let tmp = buf.get_u8()?;
24319 __struct.height_reference =
24320 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24321 enum_type: "MavOdidHeightRef",
24322 value: tmp as u64,
24323 })?;
24324 let tmp = buf.get_u8()?;
24325 __struct.horizontal_accuracy =
24326 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24327 enum_type: "MavOdidHorAcc",
24328 value: tmp as u64,
24329 })?;
24330 let tmp = buf.get_u8()?;
24331 __struct.vertical_accuracy =
24332 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24333 enum_type: "MavOdidVerAcc",
24334 value: tmp as u64,
24335 })?;
24336 let tmp = buf.get_u8()?;
24337 __struct.barometer_accuracy =
24338 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24339 enum_type: "MavOdidVerAcc",
24340 value: tmp as u64,
24341 })?;
24342 let tmp = buf.get_u8()?;
24343 __struct.speed_accuracy =
24344 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24345 enum_type: "MavOdidSpeedAcc",
24346 value: tmp as u64,
24347 })?;
24348 let tmp = buf.get_u8()?;
24349 __struct.timestamp_accuracy =
24350 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24351 enum_type: "MavOdidTimeAcc",
24352 value: tmp as u64,
24353 })?;
24354 Ok(__struct)
24355 }
24356 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24357 let mut __tmp = BytesMut::new(bytes);
24358 #[allow(clippy::absurd_extreme_comparisons)]
24359 #[allow(unused_comparisons)]
24360 if __tmp.remaining() < Self::ENCODED_LEN {
24361 panic!(
24362 "buffer is too small (need {} bytes, but got {})",
24363 Self::ENCODED_LEN,
24364 __tmp.remaining(),
24365 )
24366 }
24367 __tmp.put_i32_le(self.latitude);
24368 __tmp.put_i32_le(self.longitude);
24369 __tmp.put_f32_le(self.altitude_barometric);
24370 __tmp.put_f32_le(self.altitude_geodetic);
24371 __tmp.put_f32_le(self.height);
24372 __tmp.put_f32_le(self.timestamp);
24373 __tmp.put_u16_le(self.direction);
24374 __tmp.put_u16_le(self.speed_horizontal);
24375 __tmp.put_i16_le(self.speed_vertical);
24376 __tmp.put_u8(self.target_system);
24377 __tmp.put_u8(self.target_component);
24378 for val in &self.id_or_mac {
24379 __tmp.put_u8(*val);
24380 }
24381 __tmp.put_u8(self.status as u8);
24382 __tmp.put_u8(self.height_reference as u8);
24383 __tmp.put_u8(self.horizontal_accuracy as u8);
24384 __tmp.put_u8(self.vertical_accuracy as u8);
24385 __tmp.put_u8(self.barometer_accuracy as u8);
24386 __tmp.put_u8(self.speed_accuracy as u8);
24387 __tmp.put_u8(self.timestamp_accuracy as u8);
24388 if matches!(version, MavlinkVersion::V2) {
24389 let len = __tmp.len();
24390 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24391 } else {
24392 __tmp.len()
24393 }
24394 }
24395}
24396#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
24397#[doc = ""]
24398#[doc = "ID: 12915"]
24399#[derive(Debug, Clone, PartialEq)]
24400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24402#[cfg_attr(feature = "ts", derive(TS))]
24403#[cfg_attr(feature = "ts", ts(export))]
24404pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24405 #[doc = "System ID (0 for broadcast)."]
24406 pub target_system: u8,
24407 #[doc = "Component ID (0 for broadcast)."]
24408 pub target_component: u8,
24409 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24410 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24411 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24412 pub id_or_mac: [u8; 20],
24413 #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
24414 pub single_message_size: u8,
24415 #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
24416 pub msg_pack_size: u8,
24417 #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
24418 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24419 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24420 pub messages: [u8; 225],
24421}
24422impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24423 pub const ENCODED_LEN: usize = 249usize;
24424 pub const DEFAULT: Self = Self {
24425 target_system: 0_u8,
24426 target_component: 0_u8,
24427 id_or_mac: [0_u8; 20usize],
24428 single_message_size: 0_u8,
24429 msg_pack_size: 0_u8,
24430 messages: [0_u8; 225usize],
24431 };
24432 #[cfg(feature = "arbitrary")]
24433 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24434 use arbitrary::{Arbitrary, Unstructured};
24435 let mut buf = [0u8; 1024];
24436 rng.fill_bytes(&mut buf);
24437 let mut unstructured = Unstructured::new(&buf);
24438 Self::arbitrary(&mut unstructured).unwrap_or_default()
24439 }
24440}
24441impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24442 fn default() -> Self {
24443 Self::DEFAULT.clone()
24444 }
24445}
24446impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24447 type Message = MavMessage;
24448 const ID: u32 = 12915u32;
24449 const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
24450 const EXTRA_CRC: u8 = 94u8;
24451 const ENCODED_LEN: usize = 249usize;
24452 fn deser(
24453 _version: MavlinkVersion,
24454 __input: &[u8],
24455 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24456 let avail_len = __input.len();
24457 let mut payload_buf = [0; Self::ENCODED_LEN];
24458 let mut buf = if avail_len < Self::ENCODED_LEN {
24459 payload_buf[0..avail_len].copy_from_slice(__input);
24460 Bytes::new(&payload_buf)
24461 } else {
24462 Bytes::new(__input)
24463 };
24464 let mut __struct = Self::default();
24465 __struct.target_system = buf.get_u8()?;
24466 __struct.target_component = buf.get_u8()?;
24467 for v in &mut __struct.id_or_mac {
24468 let val = buf.get_u8()?;
24469 *v = val;
24470 }
24471 __struct.single_message_size = buf.get_u8()?;
24472 __struct.msg_pack_size = buf.get_u8()?;
24473 for v in &mut __struct.messages {
24474 let val = buf.get_u8()?;
24475 *v = val;
24476 }
24477 Ok(__struct)
24478 }
24479 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24480 let mut __tmp = BytesMut::new(bytes);
24481 #[allow(clippy::absurd_extreme_comparisons)]
24482 #[allow(unused_comparisons)]
24483 if __tmp.remaining() < Self::ENCODED_LEN {
24484 panic!(
24485 "buffer is too small (need {} bytes, but got {})",
24486 Self::ENCODED_LEN,
24487 __tmp.remaining(),
24488 )
24489 }
24490 __tmp.put_u8(self.target_system);
24491 __tmp.put_u8(self.target_component);
24492 for val in &self.id_or_mac {
24493 __tmp.put_u8(*val);
24494 }
24495 __tmp.put_u8(self.single_message_size);
24496 __tmp.put_u8(self.msg_pack_size);
24497 for val in &self.messages {
24498 __tmp.put_u8(*val);
24499 }
24500 if matches!(version, MavlinkVersion::V2) {
24501 let len = __tmp.len();
24502 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24503 } else {
24504 __tmp.len()
24505 }
24506 }
24507}
24508#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
24509#[doc = ""]
24510#[doc = "ID: 12905"]
24511#[derive(Debug, Clone, PartialEq)]
24512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24514#[cfg_attr(feature = "ts", derive(TS))]
24515#[cfg_attr(feature = "ts", ts(export))]
24516pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
24517 #[doc = "System ID (0 for broadcast)."]
24518 pub target_system: u8,
24519 #[doc = "Component ID (0 for broadcast)."]
24520 pub target_component: u8,
24521 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24522 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24523 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24524 pub id_or_mac: [u8; 20],
24525 #[doc = "Indicates the type of the operator_id field."]
24526 pub operator_id_type: MavOdidOperatorIdType,
24527 #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
24528 #[cfg_attr(feature = "ts", ts(type = "string"))]
24529 pub operator_id: CharArray<20>,
24530}
24531impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
24532 pub const ENCODED_LEN: usize = 43usize;
24533 pub const DEFAULT: Self = Self {
24534 target_system: 0_u8,
24535 target_component: 0_u8,
24536 id_or_mac: [0_u8; 20usize],
24537 operator_id_type: MavOdidOperatorIdType::DEFAULT,
24538 operator_id: CharArray::new([0_u8; 20usize]),
24539 };
24540 #[cfg(feature = "arbitrary")]
24541 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24542 use arbitrary::{Arbitrary, Unstructured};
24543 let mut buf = [0u8; 1024];
24544 rng.fill_bytes(&mut buf);
24545 let mut unstructured = Unstructured::new(&buf);
24546 Self::arbitrary(&mut unstructured).unwrap_or_default()
24547 }
24548}
24549impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
24550 fn default() -> Self {
24551 Self::DEFAULT.clone()
24552 }
24553}
24554impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
24555 type Message = MavMessage;
24556 const ID: u32 = 12905u32;
24557 const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
24558 const EXTRA_CRC: u8 = 49u8;
24559 const ENCODED_LEN: usize = 43usize;
24560 fn deser(
24561 _version: MavlinkVersion,
24562 __input: &[u8],
24563 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24564 let avail_len = __input.len();
24565 let mut payload_buf = [0; Self::ENCODED_LEN];
24566 let mut buf = if avail_len < Self::ENCODED_LEN {
24567 payload_buf[0..avail_len].copy_from_slice(__input);
24568 Bytes::new(&payload_buf)
24569 } else {
24570 Bytes::new(__input)
24571 };
24572 let mut __struct = Self::default();
24573 __struct.target_system = buf.get_u8()?;
24574 __struct.target_component = buf.get_u8()?;
24575 for v in &mut __struct.id_or_mac {
24576 let val = buf.get_u8()?;
24577 *v = val;
24578 }
24579 let tmp = buf.get_u8()?;
24580 __struct.operator_id_type =
24581 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24582 enum_type: "MavOdidOperatorIdType",
24583 value: tmp as u64,
24584 })?;
24585 let mut tmp = [0_u8; 20usize];
24586 for v in &mut tmp {
24587 *v = buf.get_u8()?;
24588 }
24589 __struct.operator_id = CharArray::new(tmp);
24590 Ok(__struct)
24591 }
24592 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24593 let mut __tmp = BytesMut::new(bytes);
24594 #[allow(clippy::absurd_extreme_comparisons)]
24595 #[allow(unused_comparisons)]
24596 if __tmp.remaining() < Self::ENCODED_LEN {
24597 panic!(
24598 "buffer is too small (need {} bytes, but got {})",
24599 Self::ENCODED_LEN,
24600 __tmp.remaining(),
24601 )
24602 }
24603 __tmp.put_u8(self.target_system);
24604 __tmp.put_u8(self.target_component);
24605 for val in &self.id_or_mac {
24606 __tmp.put_u8(*val);
24607 }
24608 __tmp.put_u8(self.operator_id_type as u8);
24609 for val in &self.operator_id {
24610 __tmp.put_u8(*val);
24611 }
24612 if matches!(version, MavlinkVersion::V2) {
24613 let len = __tmp.len();
24614 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24615 } else {
24616 __tmp.len()
24617 }
24618 }
24619}
24620#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
24621#[doc = ""]
24622#[doc = "ID: 12903"]
24623#[derive(Debug, Clone, PartialEq)]
24624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24626#[cfg_attr(feature = "ts", derive(TS))]
24627#[cfg_attr(feature = "ts", ts(export))]
24628pub struct OPEN_DRONE_ID_SELF_ID_DATA {
24629 #[doc = "System ID (0 for broadcast)."]
24630 pub target_system: u8,
24631 #[doc = "Component ID (0 for broadcast)."]
24632 pub target_component: u8,
24633 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24634 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24635 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24636 pub id_or_mac: [u8; 20],
24637 #[doc = "Indicates the type of the description field."]
24638 pub description_type: MavOdidDescType,
24639 #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
24640 #[cfg_attr(feature = "ts", ts(type = "string"))]
24641 pub description: CharArray<23>,
24642}
24643impl OPEN_DRONE_ID_SELF_ID_DATA {
24644 pub const ENCODED_LEN: usize = 46usize;
24645 pub const DEFAULT: Self = Self {
24646 target_system: 0_u8,
24647 target_component: 0_u8,
24648 id_or_mac: [0_u8; 20usize],
24649 description_type: MavOdidDescType::DEFAULT,
24650 description: CharArray::new([0_u8; 23usize]),
24651 };
24652 #[cfg(feature = "arbitrary")]
24653 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24654 use arbitrary::{Arbitrary, Unstructured};
24655 let mut buf = [0u8; 1024];
24656 rng.fill_bytes(&mut buf);
24657 let mut unstructured = Unstructured::new(&buf);
24658 Self::arbitrary(&mut unstructured).unwrap_or_default()
24659 }
24660}
24661impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
24662 fn default() -> Self {
24663 Self::DEFAULT.clone()
24664 }
24665}
24666impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
24667 type Message = MavMessage;
24668 const ID: u32 = 12903u32;
24669 const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
24670 const EXTRA_CRC: u8 = 249u8;
24671 const ENCODED_LEN: usize = 46usize;
24672 fn deser(
24673 _version: MavlinkVersion,
24674 __input: &[u8],
24675 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24676 let avail_len = __input.len();
24677 let mut payload_buf = [0; Self::ENCODED_LEN];
24678 let mut buf = if avail_len < Self::ENCODED_LEN {
24679 payload_buf[0..avail_len].copy_from_slice(__input);
24680 Bytes::new(&payload_buf)
24681 } else {
24682 Bytes::new(__input)
24683 };
24684 let mut __struct = Self::default();
24685 __struct.target_system = buf.get_u8()?;
24686 __struct.target_component = buf.get_u8()?;
24687 for v in &mut __struct.id_or_mac {
24688 let val = buf.get_u8()?;
24689 *v = val;
24690 }
24691 let tmp = buf.get_u8()?;
24692 __struct.description_type =
24693 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24694 enum_type: "MavOdidDescType",
24695 value: tmp as u64,
24696 })?;
24697 let mut tmp = [0_u8; 23usize];
24698 for v in &mut tmp {
24699 *v = buf.get_u8()?;
24700 }
24701 __struct.description = CharArray::new(tmp);
24702 Ok(__struct)
24703 }
24704 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24705 let mut __tmp = BytesMut::new(bytes);
24706 #[allow(clippy::absurd_extreme_comparisons)]
24707 #[allow(unused_comparisons)]
24708 if __tmp.remaining() < Self::ENCODED_LEN {
24709 panic!(
24710 "buffer is too small (need {} bytes, but got {})",
24711 Self::ENCODED_LEN,
24712 __tmp.remaining(),
24713 )
24714 }
24715 __tmp.put_u8(self.target_system);
24716 __tmp.put_u8(self.target_component);
24717 for val in &self.id_or_mac {
24718 __tmp.put_u8(*val);
24719 }
24720 __tmp.put_u8(self.description_type as u8);
24721 for val in &self.description {
24722 __tmp.put_u8(*val);
24723 }
24724 if matches!(version, MavlinkVersion::V2) {
24725 let len = __tmp.len();
24726 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24727 } else {
24728 __tmp.len()
24729 }
24730 }
24731}
24732#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
24733#[doc = ""]
24734#[doc = "ID: 12904"]
24735#[derive(Debug, Clone, PartialEq)]
24736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24738#[cfg_attr(feature = "ts", derive(TS))]
24739#[cfg_attr(feature = "ts", ts(export))]
24740pub struct OPEN_DRONE_ID_SYSTEM_DATA {
24741 #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
24742 pub operator_latitude: i32,
24743 #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
24744 pub operator_longitude: i32,
24745 #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
24746 pub area_ceiling: f32,
24747 #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
24748 pub area_floor: f32,
24749 #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
24750 pub operator_altitude_geo: f32,
24751 #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
24752 pub timestamp: u32,
24753 #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
24754 pub area_count: u16,
24755 #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
24756 pub area_radius: u16,
24757 #[doc = "System ID (0 for broadcast)."]
24758 pub target_system: u8,
24759 #[doc = "Component ID (0 for broadcast)."]
24760 pub target_component: u8,
24761 #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24762 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24763 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24764 pub id_or_mac: [u8; 20],
24765 #[doc = "Specifies the operator location type."]
24766 pub operator_location_type: MavOdidOperatorLocationType,
24767 #[doc = "Specifies the classification type of the UA."]
24768 pub classification_type: MavOdidClassificationType,
24769 #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
24770 pub category_eu: MavOdidCategoryEu,
24771 #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
24772 pub class_eu: MavOdidClassEu,
24773}
24774impl OPEN_DRONE_ID_SYSTEM_DATA {
24775 pub const ENCODED_LEN: usize = 54usize;
24776 pub const DEFAULT: Self = Self {
24777 operator_latitude: 0_i32,
24778 operator_longitude: 0_i32,
24779 area_ceiling: 0.0_f32,
24780 area_floor: 0.0_f32,
24781 operator_altitude_geo: 0.0_f32,
24782 timestamp: 0_u32,
24783 area_count: 0_u16,
24784 area_radius: 0_u16,
24785 target_system: 0_u8,
24786 target_component: 0_u8,
24787 id_or_mac: [0_u8; 20usize],
24788 operator_location_type: MavOdidOperatorLocationType::DEFAULT,
24789 classification_type: MavOdidClassificationType::DEFAULT,
24790 category_eu: MavOdidCategoryEu::DEFAULT,
24791 class_eu: MavOdidClassEu::DEFAULT,
24792 };
24793 #[cfg(feature = "arbitrary")]
24794 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24795 use arbitrary::{Arbitrary, Unstructured};
24796 let mut buf = [0u8; 1024];
24797 rng.fill_bytes(&mut buf);
24798 let mut unstructured = Unstructured::new(&buf);
24799 Self::arbitrary(&mut unstructured).unwrap_or_default()
24800 }
24801}
24802impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
24803 fn default() -> Self {
24804 Self::DEFAULT.clone()
24805 }
24806}
24807impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
24808 type Message = MavMessage;
24809 const ID: u32 = 12904u32;
24810 const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
24811 const EXTRA_CRC: u8 = 77u8;
24812 const ENCODED_LEN: usize = 54usize;
24813 fn deser(
24814 _version: MavlinkVersion,
24815 __input: &[u8],
24816 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24817 let avail_len = __input.len();
24818 let mut payload_buf = [0; Self::ENCODED_LEN];
24819 let mut buf = if avail_len < Self::ENCODED_LEN {
24820 payload_buf[0..avail_len].copy_from_slice(__input);
24821 Bytes::new(&payload_buf)
24822 } else {
24823 Bytes::new(__input)
24824 };
24825 let mut __struct = Self::default();
24826 __struct.operator_latitude = buf.get_i32_le()?;
24827 __struct.operator_longitude = buf.get_i32_le()?;
24828 __struct.area_ceiling = buf.get_f32_le()?;
24829 __struct.area_floor = buf.get_f32_le()?;
24830 __struct.operator_altitude_geo = buf.get_f32_le()?;
24831 __struct.timestamp = buf.get_u32_le()?;
24832 __struct.area_count = buf.get_u16_le()?;
24833 __struct.area_radius = buf.get_u16_le()?;
24834 __struct.target_system = buf.get_u8()?;
24835 __struct.target_component = buf.get_u8()?;
24836 for v in &mut __struct.id_or_mac {
24837 let val = buf.get_u8()?;
24838 *v = val;
24839 }
24840 let tmp = buf.get_u8()?;
24841 __struct.operator_location_type =
24842 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24843 enum_type: "MavOdidOperatorLocationType",
24844 value: tmp as u64,
24845 })?;
24846 let tmp = buf.get_u8()?;
24847 __struct.classification_type =
24848 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24849 enum_type: "MavOdidClassificationType",
24850 value: tmp as u64,
24851 })?;
24852 let tmp = buf.get_u8()?;
24853 __struct.category_eu =
24854 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24855 enum_type: "MavOdidCategoryEu",
24856 value: tmp as u64,
24857 })?;
24858 let tmp = buf.get_u8()?;
24859 __struct.class_eu =
24860 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24861 enum_type: "MavOdidClassEu",
24862 value: tmp as u64,
24863 })?;
24864 Ok(__struct)
24865 }
24866 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24867 let mut __tmp = BytesMut::new(bytes);
24868 #[allow(clippy::absurd_extreme_comparisons)]
24869 #[allow(unused_comparisons)]
24870 if __tmp.remaining() < Self::ENCODED_LEN {
24871 panic!(
24872 "buffer is too small (need {} bytes, but got {})",
24873 Self::ENCODED_LEN,
24874 __tmp.remaining(),
24875 )
24876 }
24877 __tmp.put_i32_le(self.operator_latitude);
24878 __tmp.put_i32_le(self.operator_longitude);
24879 __tmp.put_f32_le(self.area_ceiling);
24880 __tmp.put_f32_le(self.area_floor);
24881 __tmp.put_f32_le(self.operator_altitude_geo);
24882 __tmp.put_u32_le(self.timestamp);
24883 __tmp.put_u16_le(self.area_count);
24884 __tmp.put_u16_le(self.area_radius);
24885 __tmp.put_u8(self.target_system);
24886 __tmp.put_u8(self.target_component);
24887 for val in &self.id_or_mac {
24888 __tmp.put_u8(*val);
24889 }
24890 __tmp.put_u8(self.operator_location_type as u8);
24891 __tmp.put_u8(self.classification_type as u8);
24892 __tmp.put_u8(self.category_eu as u8);
24893 __tmp.put_u8(self.class_eu as u8);
24894 if matches!(version, MavlinkVersion::V2) {
24895 let len = __tmp.len();
24896 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24897 } else {
24898 __tmp.len()
24899 }
24900 }
24901}
24902#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
24903#[doc = ""]
24904#[doc = "ID: 12919"]
24905#[derive(Debug, Clone, PartialEq)]
24906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24908#[cfg_attr(feature = "ts", derive(TS))]
24909#[cfg_attr(feature = "ts", ts(export))]
24910pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24911 #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
24912 pub operator_latitude: i32,
24913 #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
24914 pub operator_longitude: i32,
24915 #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
24916 pub operator_altitude_geo: f32,
24917 #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
24918 pub timestamp: u32,
24919 #[doc = "System ID (0 for broadcast)."]
24920 pub target_system: u8,
24921 #[doc = "Component ID (0 for broadcast)."]
24922 pub target_component: u8,
24923}
24924impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24925 pub const ENCODED_LEN: usize = 18usize;
24926 pub const DEFAULT: Self = Self {
24927 operator_latitude: 0_i32,
24928 operator_longitude: 0_i32,
24929 operator_altitude_geo: 0.0_f32,
24930 timestamp: 0_u32,
24931 target_system: 0_u8,
24932 target_component: 0_u8,
24933 };
24934 #[cfg(feature = "arbitrary")]
24935 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24936 use arbitrary::{Arbitrary, Unstructured};
24937 let mut buf = [0u8; 1024];
24938 rng.fill_bytes(&mut buf);
24939 let mut unstructured = Unstructured::new(&buf);
24940 Self::arbitrary(&mut unstructured).unwrap_or_default()
24941 }
24942}
24943impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24944 fn default() -> Self {
24945 Self::DEFAULT.clone()
24946 }
24947}
24948impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24949 type Message = MavMessage;
24950 const ID: u32 = 12919u32;
24951 const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
24952 const EXTRA_CRC: u8 = 7u8;
24953 const ENCODED_LEN: usize = 18usize;
24954 fn deser(
24955 _version: MavlinkVersion,
24956 __input: &[u8],
24957 ) -> Result<Self, ::mavlink_core::error::ParserError> {
24958 let avail_len = __input.len();
24959 let mut payload_buf = [0; Self::ENCODED_LEN];
24960 let mut buf = if avail_len < Self::ENCODED_LEN {
24961 payload_buf[0..avail_len].copy_from_slice(__input);
24962 Bytes::new(&payload_buf)
24963 } else {
24964 Bytes::new(__input)
24965 };
24966 let mut __struct = Self::default();
24967 __struct.operator_latitude = buf.get_i32_le()?;
24968 __struct.operator_longitude = buf.get_i32_le()?;
24969 __struct.operator_altitude_geo = buf.get_f32_le()?;
24970 __struct.timestamp = buf.get_u32_le()?;
24971 __struct.target_system = buf.get_u8()?;
24972 __struct.target_component = buf.get_u8()?;
24973 Ok(__struct)
24974 }
24975 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24976 let mut __tmp = BytesMut::new(bytes);
24977 #[allow(clippy::absurd_extreme_comparisons)]
24978 #[allow(unused_comparisons)]
24979 if __tmp.remaining() < Self::ENCODED_LEN {
24980 panic!(
24981 "buffer is too small (need {} bytes, but got {})",
24982 Self::ENCODED_LEN,
24983 __tmp.remaining(),
24984 )
24985 }
24986 __tmp.put_i32_le(self.operator_latitude);
24987 __tmp.put_i32_le(self.operator_longitude);
24988 __tmp.put_f32_le(self.operator_altitude_geo);
24989 __tmp.put_u32_le(self.timestamp);
24990 __tmp.put_u8(self.target_system);
24991 __tmp.put_u8(self.target_component);
24992 if matches!(version, MavlinkVersion::V2) {
24993 let len = __tmp.len();
24994 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24995 } else {
24996 __tmp.len()
24997 }
24998 }
24999}
25000#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
25001#[doc = ""]
25002#[doc = "ID: 100"]
25003#[derive(Debug, Clone, PartialEq)]
25004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25006#[cfg_attr(feature = "ts", derive(TS))]
25007#[cfg_attr(feature = "ts", ts(export))]
25008pub struct OPTICAL_FLOW_DATA {
25009 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25010 pub time_usec: u64,
25011 #[doc = "Flow in x-sensor direction, angular-speed compensated"]
25012 pub flow_comp_m_x: f32,
25013 #[doc = "Flow in y-sensor direction, angular-speed compensated"]
25014 pub flow_comp_m_y: f32,
25015 #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
25016 pub ground_distance: f32,
25017 #[doc = "Flow in x-sensor direction"]
25018 pub flow_x: i16,
25019 #[doc = "Flow in y-sensor direction"]
25020 pub flow_y: i16,
25021 #[doc = "Sensor ID"]
25022 pub sensor_id: u8,
25023 #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
25024 pub quality: u8,
25025 #[doc = "Flow rate about X axis"]
25026 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25027 pub flow_rate_x: f32,
25028 #[doc = "Flow rate about Y axis"]
25029 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25030 pub flow_rate_y: f32,
25031}
25032impl OPTICAL_FLOW_DATA {
25033 pub const ENCODED_LEN: usize = 34usize;
25034 pub const DEFAULT: Self = Self {
25035 time_usec: 0_u64,
25036 flow_comp_m_x: 0.0_f32,
25037 flow_comp_m_y: 0.0_f32,
25038 ground_distance: 0.0_f32,
25039 flow_x: 0_i16,
25040 flow_y: 0_i16,
25041 sensor_id: 0_u8,
25042 quality: 0_u8,
25043 flow_rate_x: 0.0_f32,
25044 flow_rate_y: 0.0_f32,
25045 };
25046 #[cfg(feature = "arbitrary")]
25047 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25048 use arbitrary::{Arbitrary, Unstructured};
25049 let mut buf = [0u8; 1024];
25050 rng.fill_bytes(&mut buf);
25051 let mut unstructured = Unstructured::new(&buf);
25052 Self::arbitrary(&mut unstructured).unwrap_or_default()
25053 }
25054}
25055impl Default for OPTICAL_FLOW_DATA {
25056 fn default() -> Self {
25057 Self::DEFAULT.clone()
25058 }
25059}
25060impl MessageData for OPTICAL_FLOW_DATA {
25061 type Message = MavMessage;
25062 const ID: u32 = 100u32;
25063 const NAME: &'static str = "OPTICAL_FLOW";
25064 const EXTRA_CRC: u8 = 175u8;
25065 const ENCODED_LEN: usize = 34usize;
25066 fn deser(
25067 _version: MavlinkVersion,
25068 __input: &[u8],
25069 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25070 let avail_len = __input.len();
25071 let mut payload_buf = [0; Self::ENCODED_LEN];
25072 let mut buf = if avail_len < Self::ENCODED_LEN {
25073 payload_buf[0..avail_len].copy_from_slice(__input);
25074 Bytes::new(&payload_buf)
25075 } else {
25076 Bytes::new(__input)
25077 };
25078 let mut __struct = Self::default();
25079 __struct.time_usec = buf.get_u64_le()?;
25080 __struct.flow_comp_m_x = buf.get_f32_le()?;
25081 __struct.flow_comp_m_y = buf.get_f32_le()?;
25082 __struct.ground_distance = buf.get_f32_le()?;
25083 __struct.flow_x = buf.get_i16_le()?;
25084 __struct.flow_y = buf.get_i16_le()?;
25085 __struct.sensor_id = buf.get_u8()?;
25086 __struct.quality = buf.get_u8()?;
25087 __struct.flow_rate_x = buf.get_f32_le()?;
25088 __struct.flow_rate_y = buf.get_f32_le()?;
25089 Ok(__struct)
25090 }
25091 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25092 let mut __tmp = BytesMut::new(bytes);
25093 #[allow(clippy::absurd_extreme_comparisons)]
25094 #[allow(unused_comparisons)]
25095 if __tmp.remaining() < Self::ENCODED_LEN {
25096 panic!(
25097 "buffer is too small (need {} bytes, but got {})",
25098 Self::ENCODED_LEN,
25099 __tmp.remaining(),
25100 )
25101 }
25102 __tmp.put_u64_le(self.time_usec);
25103 __tmp.put_f32_le(self.flow_comp_m_x);
25104 __tmp.put_f32_le(self.flow_comp_m_y);
25105 __tmp.put_f32_le(self.ground_distance);
25106 __tmp.put_i16_le(self.flow_x);
25107 __tmp.put_i16_le(self.flow_y);
25108 __tmp.put_u8(self.sensor_id);
25109 __tmp.put_u8(self.quality);
25110 if matches!(version, MavlinkVersion::V2) {
25111 __tmp.put_f32_le(self.flow_rate_x);
25112 __tmp.put_f32_le(self.flow_rate_y);
25113 let len = __tmp.len();
25114 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25115 } else {
25116 __tmp.len()
25117 }
25118 }
25119}
25120#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
25121#[doc = ""]
25122#[doc = "ID: 106"]
25123#[derive(Debug, Clone, PartialEq)]
25124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25126#[cfg_attr(feature = "ts", derive(TS))]
25127#[cfg_attr(feature = "ts", ts(export))]
25128pub struct OPTICAL_FLOW_RAD_DATA {
25129 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25130 pub time_usec: u64,
25131 #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
25132 pub integration_time_us: u32,
25133 #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
25134 pub integrated_x: f32,
25135 #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
25136 pub integrated_y: f32,
25137 #[doc = "RH rotation around X axis"]
25138 pub integrated_xgyro: f32,
25139 #[doc = "RH rotation around Y axis"]
25140 pub integrated_ygyro: f32,
25141 #[doc = "RH rotation around Z axis"]
25142 pub integrated_zgyro: f32,
25143 #[doc = "Time since the distance was sampled."]
25144 pub time_delta_distance_us: u32,
25145 #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
25146 pub distance: f32,
25147 #[doc = "Temperature"]
25148 pub temperature: i16,
25149 #[doc = "Sensor ID"]
25150 pub sensor_id: u8,
25151 #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
25152 pub quality: u8,
25153}
25154impl OPTICAL_FLOW_RAD_DATA {
25155 pub const ENCODED_LEN: usize = 44usize;
25156 pub const DEFAULT: Self = Self {
25157 time_usec: 0_u64,
25158 integration_time_us: 0_u32,
25159 integrated_x: 0.0_f32,
25160 integrated_y: 0.0_f32,
25161 integrated_xgyro: 0.0_f32,
25162 integrated_ygyro: 0.0_f32,
25163 integrated_zgyro: 0.0_f32,
25164 time_delta_distance_us: 0_u32,
25165 distance: 0.0_f32,
25166 temperature: 0_i16,
25167 sensor_id: 0_u8,
25168 quality: 0_u8,
25169 };
25170 #[cfg(feature = "arbitrary")]
25171 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25172 use arbitrary::{Arbitrary, Unstructured};
25173 let mut buf = [0u8; 1024];
25174 rng.fill_bytes(&mut buf);
25175 let mut unstructured = Unstructured::new(&buf);
25176 Self::arbitrary(&mut unstructured).unwrap_or_default()
25177 }
25178}
25179impl Default for OPTICAL_FLOW_RAD_DATA {
25180 fn default() -> Self {
25181 Self::DEFAULT.clone()
25182 }
25183}
25184impl MessageData for OPTICAL_FLOW_RAD_DATA {
25185 type Message = MavMessage;
25186 const ID: u32 = 106u32;
25187 const NAME: &'static str = "OPTICAL_FLOW_RAD";
25188 const EXTRA_CRC: u8 = 138u8;
25189 const ENCODED_LEN: usize = 44usize;
25190 fn deser(
25191 _version: MavlinkVersion,
25192 __input: &[u8],
25193 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25194 let avail_len = __input.len();
25195 let mut payload_buf = [0; Self::ENCODED_LEN];
25196 let mut buf = if avail_len < Self::ENCODED_LEN {
25197 payload_buf[0..avail_len].copy_from_slice(__input);
25198 Bytes::new(&payload_buf)
25199 } else {
25200 Bytes::new(__input)
25201 };
25202 let mut __struct = Self::default();
25203 __struct.time_usec = buf.get_u64_le()?;
25204 __struct.integration_time_us = buf.get_u32_le()?;
25205 __struct.integrated_x = buf.get_f32_le()?;
25206 __struct.integrated_y = buf.get_f32_le()?;
25207 __struct.integrated_xgyro = buf.get_f32_le()?;
25208 __struct.integrated_ygyro = buf.get_f32_le()?;
25209 __struct.integrated_zgyro = buf.get_f32_le()?;
25210 __struct.time_delta_distance_us = buf.get_u32_le()?;
25211 __struct.distance = buf.get_f32_le()?;
25212 __struct.temperature = buf.get_i16_le()?;
25213 __struct.sensor_id = buf.get_u8()?;
25214 __struct.quality = buf.get_u8()?;
25215 Ok(__struct)
25216 }
25217 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25218 let mut __tmp = BytesMut::new(bytes);
25219 #[allow(clippy::absurd_extreme_comparisons)]
25220 #[allow(unused_comparisons)]
25221 if __tmp.remaining() < Self::ENCODED_LEN {
25222 panic!(
25223 "buffer is too small (need {} bytes, but got {})",
25224 Self::ENCODED_LEN,
25225 __tmp.remaining(),
25226 )
25227 }
25228 __tmp.put_u64_le(self.time_usec);
25229 __tmp.put_u32_le(self.integration_time_us);
25230 __tmp.put_f32_le(self.integrated_x);
25231 __tmp.put_f32_le(self.integrated_y);
25232 __tmp.put_f32_le(self.integrated_xgyro);
25233 __tmp.put_f32_le(self.integrated_ygyro);
25234 __tmp.put_f32_le(self.integrated_zgyro);
25235 __tmp.put_u32_le(self.time_delta_distance_us);
25236 __tmp.put_f32_le(self.distance);
25237 __tmp.put_i16_le(self.temperature);
25238 __tmp.put_u8(self.sensor_id);
25239 __tmp.put_u8(self.quality);
25240 if matches!(version, MavlinkVersion::V2) {
25241 let len = __tmp.len();
25242 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25243 } else {
25244 __tmp.len()
25245 }
25246 }
25247}
25248#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
25249#[doc = ""]
25250#[doc = "ID: 360"]
25251#[derive(Debug, Clone, PartialEq)]
25252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25254#[cfg_attr(feature = "ts", derive(TS))]
25255#[cfg_attr(feature = "ts", ts(export))]
25256pub struct ORBIT_EXECUTION_STATUS_DATA {
25257 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25258 pub time_usec: u64,
25259 #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
25260 pub radius: f32,
25261 #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
25262 pub x: i32,
25263 #[doc = "Y coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
25264 pub y: i32,
25265 #[doc = "Altitude of center point. Coordinate system depends on frame field."]
25266 pub z: f32,
25267 #[doc = "The coordinate system of the fields: x, y, z."]
25268 pub frame: MavFrame,
25269}
25270impl ORBIT_EXECUTION_STATUS_DATA {
25271 pub const ENCODED_LEN: usize = 25usize;
25272 pub const DEFAULT: Self = Self {
25273 time_usec: 0_u64,
25274 radius: 0.0_f32,
25275 x: 0_i32,
25276 y: 0_i32,
25277 z: 0.0_f32,
25278 frame: MavFrame::DEFAULT,
25279 };
25280 #[cfg(feature = "arbitrary")]
25281 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25282 use arbitrary::{Arbitrary, Unstructured};
25283 let mut buf = [0u8; 1024];
25284 rng.fill_bytes(&mut buf);
25285 let mut unstructured = Unstructured::new(&buf);
25286 Self::arbitrary(&mut unstructured).unwrap_or_default()
25287 }
25288}
25289impl Default for ORBIT_EXECUTION_STATUS_DATA {
25290 fn default() -> Self {
25291 Self::DEFAULT.clone()
25292 }
25293}
25294impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
25295 type Message = MavMessage;
25296 const ID: u32 = 360u32;
25297 const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
25298 const EXTRA_CRC: u8 = 11u8;
25299 const ENCODED_LEN: usize = 25usize;
25300 fn deser(
25301 _version: MavlinkVersion,
25302 __input: &[u8],
25303 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25304 let avail_len = __input.len();
25305 let mut payload_buf = [0; Self::ENCODED_LEN];
25306 let mut buf = if avail_len < Self::ENCODED_LEN {
25307 payload_buf[0..avail_len].copy_from_slice(__input);
25308 Bytes::new(&payload_buf)
25309 } else {
25310 Bytes::new(__input)
25311 };
25312 let mut __struct = Self::default();
25313 __struct.time_usec = buf.get_u64_le()?;
25314 __struct.radius = buf.get_f32_le()?;
25315 __struct.x = buf.get_i32_le()?;
25316 __struct.y = buf.get_i32_le()?;
25317 __struct.z = buf.get_f32_le()?;
25318 let tmp = buf.get_u8()?;
25319 __struct.frame =
25320 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25321 enum_type: "MavFrame",
25322 value: tmp as u64,
25323 })?;
25324 Ok(__struct)
25325 }
25326 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25327 let mut __tmp = BytesMut::new(bytes);
25328 #[allow(clippy::absurd_extreme_comparisons)]
25329 #[allow(unused_comparisons)]
25330 if __tmp.remaining() < Self::ENCODED_LEN {
25331 panic!(
25332 "buffer is too small (need {} bytes, but got {})",
25333 Self::ENCODED_LEN,
25334 __tmp.remaining(),
25335 )
25336 }
25337 __tmp.put_u64_le(self.time_usec);
25338 __tmp.put_f32_le(self.radius);
25339 __tmp.put_i32_le(self.x);
25340 __tmp.put_i32_le(self.y);
25341 __tmp.put_f32_le(self.z);
25342 __tmp.put_u8(self.frame as u8);
25343 if matches!(version, MavlinkVersion::V2) {
25344 let len = __tmp.len();
25345 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25346 } else {
25347 __tmp.len()
25348 }
25349 }
25350}
25351#[doc = "Parameter set/get error. Returned from a MAVLink node in response to an error in the parameter protocol, for example failing to set a parameter because it does not exist."]
25352#[doc = ""]
25353#[doc = "ID: 345"]
25354#[derive(Debug, Clone, PartialEq)]
25355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25357#[cfg_attr(feature = "ts", derive(TS))]
25358#[cfg_attr(feature = "ts", ts(export))]
25359pub struct PARAM_ERROR_DATA {
25360 #[doc = "Parameter index. Will be -1 if the param ID field should be used as an identifier (else the param id will be ignored)"]
25361 pub param_index: i16,
25362 #[doc = "System ID"]
25363 pub target_system: u8,
25364 #[doc = "Component ID"]
25365 pub target_component: u8,
25366 #[doc = "Parameter id. Terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25367 #[cfg_attr(feature = "ts", ts(type = "string"))]
25368 pub param_id: CharArray<16>,
25369 #[doc = "Error being returned to client."]
25370 pub error: MavParamError,
25371}
25372impl PARAM_ERROR_DATA {
25373 pub const ENCODED_LEN: usize = 21usize;
25374 pub const DEFAULT: Self = Self {
25375 param_index: 0_i16,
25376 target_system: 0_u8,
25377 target_component: 0_u8,
25378 param_id: CharArray::new([0_u8; 16usize]),
25379 error: MavParamError::DEFAULT,
25380 };
25381 #[cfg(feature = "arbitrary")]
25382 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25383 use arbitrary::{Arbitrary, Unstructured};
25384 let mut buf = [0u8; 1024];
25385 rng.fill_bytes(&mut buf);
25386 let mut unstructured = Unstructured::new(&buf);
25387 Self::arbitrary(&mut unstructured).unwrap_or_default()
25388 }
25389}
25390impl Default for PARAM_ERROR_DATA {
25391 fn default() -> Self {
25392 Self::DEFAULT.clone()
25393 }
25394}
25395impl MessageData for PARAM_ERROR_DATA {
25396 type Message = MavMessage;
25397 const ID: u32 = 345u32;
25398 const NAME: &'static str = "PARAM_ERROR";
25399 const EXTRA_CRC: u8 = 209u8;
25400 const ENCODED_LEN: usize = 21usize;
25401 fn deser(
25402 _version: MavlinkVersion,
25403 __input: &[u8],
25404 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25405 let avail_len = __input.len();
25406 let mut payload_buf = [0; Self::ENCODED_LEN];
25407 let mut buf = if avail_len < Self::ENCODED_LEN {
25408 payload_buf[0..avail_len].copy_from_slice(__input);
25409 Bytes::new(&payload_buf)
25410 } else {
25411 Bytes::new(__input)
25412 };
25413 let mut __struct = Self::default();
25414 __struct.param_index = buf.get_i16_le()?;
25415 __struct.target_system = buf.get_u8()?;
25416 __struct.target_component = buf.get_u8()?;
25417 let mut tmp = [0_u8; 16usize];
25418 for v in &mut tmp {
25419 *v = buf.get_u8()?;
25420 }
25421 __struct.param_id = CharArray::new(tmp);
25422 let tmp = buf.get_u8()?;
25423 __struct.error =
25424 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25425 enum_type: "MavParamError",
25426 value: tmp as u64,
25427 })?;
25428 Ok(__struct)
25429 }
25430 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25431 let mut __tmp = BytesMut::new(bytes);
25432 #[allow(clippy::absurd_extreme_comparisons)]
25433 #[allow(unused_comparisons)]
25434 if __tmp.remaining() < Self::ENCODED_LEN {
25435 panic!(
25436 "buffer is too small (need {} bytes, but got {})",
25437 Self::ENCODED_LEN,
25438 __tmp.remaining(),
25439 )
25440 }
25441 __tmp.put_i16_le(self.param_index);
25442 __tmp.put_u8(self.target_system);
25443 __tmp.put_u8(self.target_component);
25444 for val in &self.param_id {
25445 __tmp.put_u8(*val);
25446 }
25447 __tmp.put_u8(self.error as u8);
25448 if matches!(version, MavlinkVersion::V2) {
25449 let len = __tmp.len();
25450 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25451 } else {
25452 __tmp.len()
25453 }
25454 }
25455}
25456#[doc = "Response from a PARAM_EXT_SET message."]
25457#[doc = ""]
25458#[doc = "ID: 324"]
25459#[derive(Debug, Clone, PartialEq)]
25460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25462#[cfg_attr(feature = "ts", derive(TS))]
25463#[cfg_attr(feature = "ts", ts(export))]
25464pub struct PARAM_EXT_ACK_DATA {
25465 #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25466 #[cfg_attr(feature = "ts", ts(type = "string"))]
25467 pub param_id: CharArray<16>,
25468 #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
25469 #[cfg_attr(feature = "ts", ts(type = "string"))]
25470 pub param_value: CharArray<128>,
25471 #[doc = "Parameter type."]
25472 pub param_type: MavParamExtType,
25473 #[doc = "Result code."]
25474 pub param_result: ParamAck,
25475}
25476impl PARAM_EXT_ACK_DATA {
25477 pub const ENCODED_LEN: usize = 146usize;
25478 pub const DEFAULT: Self = Self {
25479 param_id: CharArray::new([0_u8; 16usize]),
25480 param_value: CharArray::new([0_u8; 128usize]),
25481 param_type: MavParamExtType::DEFAULT,
25482 param_result: ParamAck::DEFAULT,
25483 };
25484 #[cfg(feature = "arbitrary")]
25485 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25486 use arbitrary::{Arbitrary, Unstructured};
25487 let mut buf = [0u8; 1024];
25488 rng.fill_bytes(&mut buf);
25489 let mut unstructured = Unstructured::new(&buf);
25490 Self::arbitrary(&mut unstructured).unwrap_or_default()
25491 }
25492}
25493impl Default for PARAM_EXT_ACK_DATA {
25494 fn default() -> Self {
25495 Self::DEFAULT.clone()
25496 }
25497}
25498impl MessageData for PARAM_EXT_ACK_DATA {
25499 type Message = MavMessage;
25500 const ID: u32 = 324u32;
25501 const NAME: &'static str = "PARAM_EXT_ACK";
25502 const EXTRA_CRC: u8 = 132u8;
25503 const ENCODED_LEN: usize = 146usize;
25504 fn deser(
25505 _version: MavlinkVersion,
25506 __input: &[u8],
25507 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25508 let avail_len = __input.len();
25509 let mut payload_buf = [0; Self::ENCODED_LEN];
25510 let mut buf = if avail_len < Self::ENCODED_LEN {
25511 payload_buf[0..avail_len].copy_from_slice(__input);
25512 Bytes::new(&payload_buf)
25513 } else {
25514 Bytes::new(__input)
25515 };
25516 let mut __struct = Self::default();
25517 let mut tmp = [0_u8; 16usize];
25518 for v in &mut tmp {
25519 *v = buf.get_u8()?;
25520 }
25521 __struct.param_id = CharArray::new(tmp);
25522 let mut tmp = [0_u8; 128usize];
25523 for v in &mut tmp {
25524 *v = buf.get_u8()?;
25525 }
25526 __struct.param_value = CharArray::new(tmp);
25527 let tmp = buf.get_u8()?;
25528 __struct.param_type =
25529 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25530 enum_type: "MavParamExtType",
25531 value: tmp as u64,
25532 })?;
25533 let tmp = buf.get_u8()?;
25534 __struct.param_result =
25535 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25536 enum_type: "ParamAck",
25537 value: tmp as u64,
25538 })?;
25539 Ok(__struct)
25540 }
25541 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25542 let mut __tmp = BytesMut::new(bytes);
25543 #[allow(clippy::absurd_extreme_comparisons)]
25544 #[allow(unused_comparisons)]
25545 if __tmp.remaining() < Self::ENCODED_LEN {
25546 panic!(
25547 "buffer is too small (need {} bytes, but got {})",
25548 Self::ENCODED_LEN,
25549 __tmp.remaining(),
25550 )
25551 }
25552 for val in &self.param_id {
25553 __tmp.put_u8(*val);
25554 }
25555 for val in &self.param_value {
25556 __tmp.put_u8(*val);
25557 }
25558 __tmp.put_u8(self.param_type as u8);
25559 __tmp.put_u8(self.param_result as u8);
25560 if matches!(version, MavlinkVersion::V2) {
25561 let len = __tmp.len();
25562 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25563 } else {
25564 __tmp.len()
25565 }
25566 }
25567}
25568#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
25569#[doc = ""]
25570#[doc = "ID: 321"]
25571#[derive(Debug, Clone, PartialEq)]
25572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25574#[cfg_attr(feature = "ts", derive(TS))]
25575#[cfg_attr(feature = "ts", ts(export))]
25576pub struct PARAM_EXT_REQUEST_LIST_DATA {
25577 #[doc = "System ID"]
25578 pub target_system: u8,
25579 #[doc = "Component ID"]
25580 pub target_component: u8,
25581}
25582impl PARAM_EXT_REQUEST_LIST_DATA {
25583 pub const ENCODED_LEN: usize = 2usize;
25584 pub const DEFAULT: Self = Self {
25585 target_system: 0_u8,
25586 target_component: 0_u8,
25587 };
25588 #[cfg(feature = "arbitrary")]
25589 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25590 use arbitrary::{Arbitrary, Unstructured};
25591 let mut buf = [0u8; 1024];
25592 rng.fill_bytes(&mut buf);
25593 let mut unstructured = Unstructured::new(&buf);
25594 Self::arbitrary(&mut unstructured).unwrap_or_default()
25595 }
25596}
25597impl Default for PARAM_EXT_REQUEST_LIST_DATA {
25598 fn default() -> Self {
25599 Self::DEFAULT.clone()
25600 }
25601}
25602impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
25603 type Message = MavMessage;
25604 const ID: u32 = 321u32;
25605 const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
25606 const EXTRA_CRC: u8 = 88u8;
25607 const ENCODED_LEN: usize = 2usize;
25608 fn deser(
25609 _version: MavlinkVersion,
25610 __input: &[u8],
25611 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25612 let avail_len = __input.len();
25613 let mut payload_buf = [0; Self::ENCODED_LEN];
25614 let mut buf = if avail_len < Self::ENCODED_LEN {
25615 payload_buf[0..avail_len].copy_from_slice(__input);
25616 Bytes::new(&payload_buf)
25617 } else {
25618 Bytes::new(__input)
25619 };
25620 let mut __struct = Self::default();
25621 __struct.target_system = buf.get_u8()?;
25622 __struct.target_component = buf.get_u8()?;
25623 Ok(__struct)
25624 }
25625 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25626 let mut __tmp = BytesMut::new(bytes);
25627 #[allow(clippy::absurd_extreme_comparisons)]
25628 #[allow(unused_comparisons)]
25629 if __tmp.remaining() < Self::ENCODED_LEN {
25630 panic!(
25631 "buffer is too small (need {} bytes, but got {})",
25632 Self::ENCODED_LEN,
25633 __tmp.remaining(),
25634 )
25635 }
25636 __tmp.put_u8(self.target_system);
25637 __tmp.put_u8(self.target_component);
25638 if matches!(version, MavlinkVersion::V2) {
25639 let len = __tmp.len();
25640 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25641 } else {
25642 __tmp.len()
25643 }
25644 }
25645}
25646#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
25647#[doc = ""]
25648#[doc = "ID: 320"]
25649#[derive(Debug, Clone, PartialEq)]
25650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25652#[cfg_attr(feature = "ts", derive(TS))]
25653#[cfg_attr(feature = "ts", ts(export))]
25654pub struct PARAM_EXT_REQUEST_READ_DATA {
25655 #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
25656 pub param_index: i16,
25657 #[doc = "System ID"]
25658 pub target_system: u8,
25659 #[doc = "Component ID"]
25660 pub target_component: u8,
25661 #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25662 #[cfg_attr(feature = "ts", ts(type = "string"))]
25663 pub param_id: CharArray<16>,
25664}
25665impl PARAM_EXT_REQUEST_READ_DATA {
25666 pub const ENCODED_LEN: usize = 20usize;
25667 pub const DEFAULT: Self = Self {
25668 param_index: 0_i16,
25669 target_system: 0_u8,
25670 target_component: 0_u8,
25671 param_id: CharArray::new([0_u8; 16usize]),
25672 };
25673 #[cfg(feature = "arbitrary")]
25674 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25675 use arbitrary::{Arbitrary, Unstructured};
25676 let mut buf = [0u8; 1024];
25677 rng.fill_bytes(&mut buf);
25678 let mut unstructured = Unstructured::new(&buf);
25679 Self::arbitrary(&mut unstructured).unwrap_or_default()
25680 }
25681}
25682impl Default for PARAM_EXT_REQUEST_READ_DATA {
25683 fn default() -> Self {
25684 Self::DEFAULT.clone()
25685 }
25686}
25687impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
25688 type Message = MavMessage;
25689 const ID: u32 = 320u32;
25690 const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
25691 const EXTRA_CRC: u8 = 243u8;
25692 const ENCODED_LEN: usize = 20usize;
25693 fn deser(
25694 _version: MavlinkVersion,
25695 __input: &[u8],
25696 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25697 let avail_len = __input.len();
25698 let mut payload_buf = [0; Self::ENCODED_LEN];
25699 let mut buf = if avail_len < Self::ENCODED_LEN {
25700 payload_buf[0..avail_len].copy_from_slice(__input);
25701 Bytes::new(&payload_buf)
25702 } else {
25703 Bytes::new(__input)
25704 };
25705 let mut __struct = Self::default();
25706 __struct.param_index = buf.get_i16_le()?;
25707 __struct.target_system = buf.get_u8()?;
25708 __struct.target_component = buf.get_u8()?;
25709 let mut tmp = [0_u8; 16usize];
25710 for v in &mut tmp {
25711 *v = buf.get_u8()?;
25712 }
25713 __struct.param_id = CharArray::new(tmp);
25714 Ok(__struct)
25715 }
25716 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25717 let mut __tmp = BytesMut::new(bytes);
25718 #[allow(clippy::absurd_extreme_comparisons)]
25719 #[allow(unused_comparisons)]
25720 if __tmp.remaining() < Self::ENCODED_LEN {
25721 panic!(
25722 "buffer is too small (need {} bytes, but got {})",
25723 Self::ENCODED_LEN,
25724 __tmp.remaining(),
25725 )
25726 }
25727 __tmp.put_i16_le(self.param_index);
25728 __tmp.put_u8(self.target_system);
25729 __tmp.put_u8(self.target_component);
25730 for val in &self.param_id {
25731 __tmp.put_u8(*val);
25732 }
25733 if matches!(version, MavlinkVersion::V2) {
25734 let len = __tmp.len();
25735 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25736 } else {
25737 __tmp.len()
25738 }
25739 }
25740}
25741#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
25742#[doc = ""]
25743#[doc = "ID: 323"]
25744#[derive(Debug, Clone, PartialEq)]
25745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25747#[cfg_attr(feature = "ts", derive(TS))]
25748#[cfg_attr(feature = "ts", ts(export))]
25749pub struct PARAM_EXT_SET_DATA {
25750 #[doc = "System ID"]
25751 pub target_system: u8,
25752 #[doc = "Component ID"]
25753 pub target_component: u8,
25754 #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25755 #[cfg_attr(feature = "ts", ts(type = "string"))]
25756 pub param_id: CharArray<16>,
25757 #[doc = "Parameter value"]
25758 #[cfg_attr(feature = "ts", ts(type = "string"))]
25759 pub param_value: CharArray<128>,
25760 #[doc = "Parameter type."]
25761 pub param_type: MavParamExtType,
25762}
25763impl PARAM_EXT_SET_DATA {
25764 pub const ENCODED_LEN: usize = 147usize;
25765 pub const DEFAULT: Self = Self {
25766 target_system: 0_u8,
25767 target_component: 0_u8,
25768 param_id: CharArray::new([0_u8; 16usize]),
25769 param_value: CharArray::new([0_u8; 128usize]),
25770 param_type: MavParamExtType::DEFAULT,
25771 };
25772 #[cfg(feature = "arbitrary")]
25773 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25774 use arbitrary::{Arbitrary, Unstructured};
25775 let mut buf = [0u8; 1024];
25776 rng.fill_bytes(&mut buf);
25777 let mut unstructured = Unstructured::new(&buf);
25778 Self::arbitrary(&mut unstructured).unwrap_or_default()
25779 }
25780}
25781impl Default for PARAM_EXT_SET_DATA {
25782 fn default() -> Self {
25783 Self::DEFAULT.clone()
25784 }
25785}
25786impl MessageData for PARAM_EXT_SET_DATA {
25787 type Message = MavMessage;
25788 const ID: u32 = 323u32;
25789 const NAME: &'static str = "PARAM_EXT_SET";
25790 const EXTRA_CRC: u8 = 78u8;
25791 const ENCODED_LEN: usize = 147usize;
25792 fn deser(
25793 _version: MavlinkVersion,
25794 __input: &[u8],
25795 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25796 let avail_len = __input.len();
25797 let mut payload_buf = [0; Self::ENCODED_LEN];
25798 let mut buf = if avail_len < Self::ENCODED_LEN {
25799 payload_buf[0..avail_len].copy_from_slice(__input);
25800 Bytes::new(&payload_buf)
25801 } else {
25802 Bytes::new(__input)
25803 };
25804 let mut __struct = Self::default();
25805 __struct.target_system = buf.get_u8()?;
25806 __struct.target_component = buf.get_u8()?;
25807 let mut tmp = [0_u8; 16usize];
25808 for v in &mut tmp {
25809 *v = buf.get_u8()?;
25810 }
25811 __struct.param_id = CharArray::new(tmp);
25812 let mut tmp = [0_u8; 128usize];
25813 for v in &mut tmp {
25814 *v = buf.get_u8()?;
25815 }
25816 __struct.param_value = CharArray::new(tmp);
25817 let tmp = buf.get_u8()?;
25818 __struct.param_type =
25819 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25820 enum_type: "MavParamExtType",
25821 value: tmp as u64,
25822 })?;
25823 Ok(__struct)
25824 }
25825 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25826 let mut __tmp = BytesMut::new(bytes);
25827 #[allow(clippy::absurd_extreme_comparisons)]
25828 #[allow(unused_comparisons)]
25829 if __tmp.remaining() < Self::ENCODED_LEN {
25830 panic!(
25831 "buffer is too small (need {} bytes, but got {})",
25832 Self::ENCODED_LEN,
25833 __tmp.remaining(),
25834 )
25835 }
25836 __tmp.put_u8(self.target_system);
25837 __tmp.put_u8(self.target_component);
25838 for val in &self.param_id {
25839 __tmp.put_u8(*val);
25840 }
25841 for val in &self.param_value {
25842 __tmp.put_u8(*val);
25843 }
25844 __tmp.put_u8(self.param_type as u8);
25845 if matches!(version, MavlinkVersion::V2) {
25846 let len = __tmp.len();
25847 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25848 } else {
25849 __tmp.len()
25850 }
25851 }
25852}
25853#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
25854#[doc = ""]
25855#[doc = "ID: 322"]
25856#[derive(Debug, Clone, PartialEq)]
25857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25859#[cfg_attr(feature = "ts", derive(TS))]
25860#[cfg_attr(feature = "ts", ts(export))]
25861pub struct PARAM_EXT_VALUE_DATA {
25862 #[doc = "Total number of parameters"]
25863 pub param_count: u16,
25864 #[doc = "Index of this parameter"]
25865 pub param_index: u16,
25866 #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25867 #[cfg_attr(feature = "ts", ts(type = "string"))]
25868 pub param_id: CharArray<16>,
25869 #[doc = "Parameter value"]
25870 #[cfg_attr(feature = "ts", ts(type = "string"))]
25871 pub param_value: CharArray<128>,
25872 #[doc = "Parameter type."]
25873 pub param_type: MavParamExtType,
25874}
25875impl PARAM_EXT_VALUE_DATA {
25876 pub const ENCODED_LEN: usize = 149usize;
25877 pub const DEFAULT: Self = Self {
25878 param_count: 0_u16,
25879 param_index: 0_u16,
25880 param_id: CharArray::new([0_u8; 16usize]),
25881 param_value: CharArray::new([0_u8; 128usize]),
25882 param_type: MavParamExtType::DEFAULT,
25883 };
25884 #[cfg(feature = "arbitrary")]
25885 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25886 use arbitrary::{Arbitrary, Unstructured};
25887 let mut buf = [0u8; 1024];
25888 rng.fill_bytes(&mut buf);
25889 let mut unstructured = Unstructured::new(&buf);
25890 Self::arbitrary(&mut unstructured).unwrap_or_default()
25891 }
25892}
25893impl Default for PARAM_EXT_VALUE_DATA {
25894 fn default() -> Self {
25895 Self::DEFAULT.clone()
25896 }
25897}
25898impl MessageData for PARAM_EXT_VALUE_DATA {
25899 type Message = MavMessage;
25900 const ID: u32 = 322u32;
25901 const NAME: &'static str = "PARAM_EXT_VALUE";
25902 const EXTRA_CRC: u8 = 243u8;
25903 const ENCODED_LEN: usize = 149usize;
25904 fn deser(
25905 _version: MavlinkVersion,
25906 __input: &[u8],
25907 ) -> Result<Self, ::mavlink_core::error::ParserError> {
25908 let avail_len = __input.len();
25909 let mut payload_buf = [0; Self::ENCODED_LEN];
25910 let mut buf = if avail_len < Self::ENCODED_LEN {
25911 payload_buf[0..avail_len].copy_from_slice(__input);
25912 Bytes::new(&payload_buf)
25913 } else {
25914 Bytes::new(__input)
25915 };
25916 let mut __struct = Self::default();
25917 __struct.param_count = buf.get_u16_le()?;
25918 __struct.param_index = buf.get_u16_le()?;
25919 let mut tmp = [0_u8; 16usize];
25920 for v in &mut tmp {
25921 *v = buf.get_u8()?;
25922 }
25923 __struct.param_id = CharArray::new(tmp);
25924 let mut tmp = [0_u8; 128usize];
25925 for v in &mut tmp {
25926 *v = buf.get_u8()?;
25927 }
25928 __struct.param_value = CharArray::new(tmp);
25929 let tmp = buf.get_u8()?;
25930 __struct.param_type =
25931 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25932 enum_type: "MavParamExtType",
25933 value: tmp as u64,
25934 })?;
25935 Ok(__struct)
25936 }
25937 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25938 let mut __tmp = BytesMut::new(bytes);
25939 #[allow(clippy::absurd_extreme_comparisons)]
25940 #[allow(unused_comparisons)]
25941 if __tmp.remaining() < Self::ENCODED_LEN {
25942 panic!(
25943 "buffer is too small (need {} bytes, but got {})",
25944 Self::ENCODED_LEN,
25945 __tmp.remaining(),
25946 )
25947 }
25948 __tmp.put_u16_le(self.param_count);
25949 __tmp.put_u16_le(self.param_index);
25950 for val in &self.param_id {
25951 __tmp.put_u8(*val);
25952 }
25953 for val in &self.param_value {
25954 __tmp.put_u8(*val);
25955 }
25956 __tmp.put_u8(self.param_type as u8);
25957 if matches!(version, MavlinkVersion::V2) {
25958 let len = __tmp.len();
25959 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25960 } else {
25961 __tmp.len()
25962 }
25963 }
25964}
25965#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
25966#[doc = ""]
25967#[doc = "ID: 50"]
25968#[derive(Debug, Clone, PartialEq)]
25969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25971#[cfg_attr(feature = "ts", derive(TS))]
25972#[cfg_attr(feature = "ts", ts(export))]
25973pub struct PARAM_MAP_RC_DATA {
25974 #[doc = "Initial parameter value"]
25975 pub param_value0: f32,
25976 #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
25977 pub scale: f32,
25978 #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
25979 pub param_value_min: f32,
25980 #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
25981 pub param_value_max: f32,
25982 #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
25983 pub param_index: i16,
25984 #[doc = "System ID"]
25985 pub target_system: u8,
25986 #[doc = "Component ID"]
25987 pub target_component: u8,
25988 #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25989 #[cfg_attr(feature = "ts", ts(type = "string"))]
25990 pub param_id: CharArray<16>,
25991 #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
25992 pub parameter_rc_channel_index: u8,
25993}
25994impl PARAM_MAP_RC_DATA {
25995 pub const ENCODED_LEN: usize = 37usize;
25996 pub const DEFAULT: Self = Self {
25997 param_value0: 0.0_f32,
25998 scale: 0.0_f32,
25999 param_value_min: 0.0_f32,
26000 param_value_max: 0.0_f32,
26001 param_index: 0_i16,
26002 target_system: 0_u8,
26003 target_component: 0_u8,
26004 param_id: CharArray::new([0_u8; 16usize]),
26005 parameter_rc_channel_index: 0_u8,
26006 };
26007 #[cfg(feature = "arbitrary")]
26008 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26009 use arbitrary::{Arbitrary, Unstructured};
26010 let mut buf = [0u8; 1024];
26011 rng.fill_bytes(&mut buf);
26012 let mut unstructured = Unstructured::new(&buf);
26013 Self::arbitrary(&mut unstructured).unwrap_or_default()
26014 }
26015}
26016impl Default for PARAM_MAP_RC_DATA {
26017 fn default() -> Self {
26018 Self::DEFAULT.clone()
26019 }
26020}
26021impl MessageData for PARAM_MAP_RC_DATA {
26022 type Message = MavMessage;
26023 const ID: u32 = 50u32;
26024 const NAME: &'static str = "PARAM_MAP_RC";
26025 const EXTRA_CRC: u8 = 78u8;
26026 const ENCODED_LEN: usize = 37usize;
26027 fn deser(
26028 _version: MavlinkVersion,
26029 __input: &[u8],
26030 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26031 let avail_len = __input.len();
26032 let mut payload_buf = [0; Self::ENCODED_LEN];
26033 let mut buf = if avail_len < Self::ENCODED_LEN {
26034 payload_buf[0..avail_len].copy_from_slice(__input);
26035 Bytes::new(&payload_buf)
26036 } else {
26037 Bytes::new(__input)
26038 };
26039 let mut __struct = Self::default();
26040 __struct.param_value0 = buf.get_f32_le()?;
26041 __struct.scale = buf.get_f32_le()?;
26042 __struct.param_value_min = buf.get_f32_le()?;
26043 __struct.param_value_max = buf.get_f32_le()?;
26044 __struct.param_index = buf.get_i16_le()?;
26045 __struct.target_system = buf.get_u8()?;
26046 __struct.target_component = buf.get_u8()?;
26047 let mut tmp = [0_u8; 16usize];
26048 for v in &mut tmp {
26049 *v = buf.get_u8()?;
26050 }
26051 __struct.param_id = CharArray::new(tmp);
26052 __struct.parameter_rc_channel_index = buf.get_u8()?;
26053 Ok(__struct)
26054 }
26055 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26056 let mut __tmp = BytesMut::new(bytes);
26057 #[allow(clippy::absurd_extreme_comparisons)]
26058 #[allow(unused_comparisons)]
26059 if __tmp.remaining() < Self::ENCODED_LEN {
26060 panic!(
26061 "buffer is too small (need {} bytes, but got {})",
26062 Self::ENCODED_LEN,
26063 __tmp.remaining(),
26064 )
26065 }
26066 __tmp.put_f32_le(self.param_value0);
26067 __tmp.put_f32_le(self.scale);
26068 __tmp.put_f32_le(self.param_value_min);
26069 __tmp.put_f32_le(self.param_value_max);
26070 __tmp.put_i16_le(self.param_index);
26071 __tmp.put_u8(self.target_system);
26072 __tmp.put_u8(self.target_component);
26073 for val in &self.param_id {
26074 __tmp.put_u8(*val);
26075 }
26076 __tmp.put_u8(self.parameter_rc_channel_index);
26077 if matches!(version, MavlinkVersion::V2) {
26078 let len = __tmp.len();
26079 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26080 } else {
26081 __tmp.len()
26082 }
26083 }
26084}
26085#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26086#[doc = ""]
26087#[doc = "ID: 21"]
26088#[derive(Debug, Clone, PartialEq)]
26089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26091#[cfg_attr(feature = "ts", derive(TS))]
26092#[cfg_attr(feature = "ts", ts(export))]
26093pub struct PARAM_REQUEST_LIST_DATA {
26094 #[doc = "System ID"]
26095 pub target_system: u8,
26096 #[doc = "Component ID"]
26097 pub target_component: u8,
26098}
26099impl PARAM_REQUEST_LIST_DATA {
26100 pub const ENCODED_LEN: usize = 2usize;
26101 pub const DEFAULT: Self = Self {
26102 target_system: 0_u8,
26103 target_component: 0_u8,
26104 };
26105 #[cfg(feature = "arbitrary")]
26106 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26107 use arbitrary::{Arbitrary, Unstructured};
26108 let mut buf = [0u8; 1024];
26109 rng.fill_bytes(&mut buf);
26110 let mut unstructured = Unstructured::new(&buf);
26111 Self::arbitrary(&mut unstructured).unwrap_or_default()
26112 }
26113}
26114impl Default for PARAM_REQUEST_LIST_DATA {
26115 fn default() -> Self {
26116 Self::DEFAULT.clone()
26117 }
26118}
26119impl MessageData for PARAM_REQUEST_LIST_DATA {
26120 type Message = MavMessage;
26121 const ID: u32 = 21u32;
26122 const NAME: &'static str = "PARAM_REQUEST_LIST";
26123 const EXTRA_CRC: u8 = 159u8;
26124 const ENCODED_LEN: usize = 2usize;
26125 fn deser(
26126 _version: MavlinkVersion,
26127 __input: &[u8],
26128 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26129 let avail_len = __input.len();
26130 let mut payload_buf = [0; Self::ENCODED_LEN];
26131 let mut buf = if avail_len < Self::ENCODED_LEN {
26132 payload_buf[0..avail_len].copy_from_slice(__input);
26133 Bytes::new(&payload_buf)
26134 } else {
26135 Bytes::new(__input)
26136 };
26137 let mut __struct = Self::default();
26138 __struct.target_system = buf.get_u8()?;
26139 __struct.target_component = buf.get_u8()?;
26140 Ok(__struct)
26141 }
26142 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26143 let mut __tmp = BytesMut::new(bytes);
26144 #[allow(clippy::absurd_extreme_comparisons)]
26145 #[allow(unused_comparisons)]
26146 if __tmp.remaining() < Self::ENCODED_LEN {
26147 panic!(
26148 "buffer is too small (need {} bytes, but got {})",
26149 Self::ENCODED_LEN,
26150 __tmp.remaining(),
26151 )
26152 }
26153 __tmp.put_u8(self.target_system);
26154 __tmp.put_u8(self.target_component);
26155 if matches!(version, MavlinkVersion::V2) {
26156 let len = __tmp.len();
26157 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26158 } else {
26159 __tmp.len()
26160 }
26161 }
26162}
26163#[doc = "Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] ->value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
26164#[doc = ""]
26165#[doc = "ID: 20"]
26166#[derive(Debug, Clone, PartialEq)]
26167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26169#[cfg_attr(feature = "ts", derive(TS))]
26170#[cfg_attr(feature = "ts", ts(export))]
26171pub struct PARAM_REQUEST_READ_DATA {
26172 #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
26173 pub param_index: i16,
26174 #[doc = "System ID"]
26175 pub target_system: u8,
26176 #[doc = "Component ID"]
26177 pub target_component: u8,
26178 #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26179 #[cfg_attr(feature = "ts", ts(type = "string"))]
26180 pub param_id: CharArray<16>,
26181}
26182impl PARAM_REQUEST_READ_DATA {
26183 pub const ENCODED_LEN: usize = 20usize;
26184 pub const DEFAULT: Self = Self {
26185 param_index: 0_i16,
26186 target_system: 0_u8,
26187 target_component: 0_u8,
26188 param_id: CharArray::new([0_u8; 16usize]),
26189 };
26190 #[cfg(feature = "arbitrary")]
26191 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26192 use arbitrary::{Arbitrary, Unstructured};
26193 let mut buf = [0u8; 1024];
26194 rng.fill_bytes(&mut buf);
26195 let mut unstructured = Unstructured::new(&buf);
26196 Self::arbitrary(&mut unstructured).unwrap_or_default()
26197 }
26198}
26199impl Default for PARAM_REQUEST_READ_DATA {
26200 fn default() -> Self {
26201 Self::DEFAULT.clone()
26202 }
26203}
26204impl MessageData for PARAM_REQUEST_READ_DATA {
26205 type Message = MavMessage;
26206 const ID: u32 = 20u32;
26207 const NAME: &'static str = "PARAM_REQUEST_READ";
26208 const EXTRA_CRC: u8 = 214u8;
26209 const ENCODED_LEN: usize = 20usize;
26210 fn deser(
26211 _version: MavlinkVersion,
26212 __input: &[u8],
26213 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26214 let avail_len = __input.len();
26215 let mut payload_buf = [0; Self::ENCODED_LEN];
26216 let mut buf = if avail_len < Self::ENCODED_LEN {
26217 payload_buf[0..avail_len].copy_from_slice(__input);
26218 Bytes::new(&payload_buf)
26219 } else {
26220 Bytes::new(__input)
26221 };
26222 let mut __struct = Self::default();
26223 __struct.param_index = buf.get_i16_le()?;
26224 __struct.target_system = buf.get_u8()?;
26225 __struct.target_component = buf.get_u8()?;
26226 let mut tmp = [0_u8; 16usize];
26227 for v in &mut tmp {
26228 *v = buf.get_u8()?;
26229 }
26230 __struct.param_id = CharArray::new(tmp);
26231 Ok(__struct)
26232 }
26233 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26234 let mut __tmp = BytesMut::new(bytes);
26235 #[allow(clippy::absurd_extreme_comparisons)]
26236 #[allow(unused_comparisons)]
26237 if __tmp.remaining() < Self::ENCODED_LEN {
26238 panic!(
26239 "buffer is too small (need {} bytes, but got {})",
26240 Self::ENCODED_LEN,
26241 __tmp.remaining(),
26242 )
26243 }
26244 __tmp.put_i16_le(self.param_index);
26245 __tmp.put_u8(self.target_system);
26246 __tmp.put_u8(self.target_component);
26247 for val in &self.param_id {
26248 __tmp.put_u8(*val);
26249 }
26250 if matches!(version, MavlinkVersion::V2) {
26251 let len = __tmp.len();
26252 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26253 } else {
26254 __tmp.len()
26255 }
26256 }
26257}
26258#[doc = "Set a parameter value (write new value to permanent storage). The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26259#[doc = ""]
26260#[doc = "ID: 23"]
26261#[derive(Debug, Clone, PartialEq)]
26262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26264#[cfg_attr(feature = "ts", derive(TS))]
26265#[cfg_attr(feature = "ts", ts(export))]
26266pub struct PARAM_SET_DATA {
26267 #[doc = "Onboard parameter value"]
26268 pub param_value: f32,
26269 #[doc = "System ID"]
26270 pub target_system: u8,
26271 #[doc = "Component ID"]
26272 pub target_component: u8,
26273 #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26274 #[cfg_attr(feature = "ts", ts(type = "string"))]
26275 pub param_id: CharArray<16>,
26276 #[doc = "Onboard parameter type."]
26277 pub param_type: MavParamType,
26278}
26279impl PARAM_SET_DATA {
26280 pub const ENCODED_LEN: usize = 23usize;
26281 pub const DEFAULT: Self = Self {
26282 param_value: 0.0_f32,
26283 target_system: 0_u8,
26284 target_component: 0_u8,
26285 param_id: CharArray::new([0_u8; 16usize]),
26286 param_type: MavParamType::DEFAULT,
26287 };
26288 #[cfg(feature = "arbitrary")]
26289 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26290 use arbitrary::{Arbitrary, Unstructured};
26291 let mut buf = [0u8; 1024];
26292 rng.fill_bytes(&mut buf);
26293 let mut unstructured = Unstructured::new(&buf);
26294 Self::arbitrary(&mut unstructured).unwrap_or_default()
26295 }
26296}
26297impl Default for PARAM_SET_DATA {
26298 fn default() -> Self {
26299 Self::DEFAULT.clone()
26300 }
26301}
26302impl MessageData for PARAM_SET_DATA {
26303 type Message = MavMessage;
26304 const ID: u32 = 23u32;
26305 const NAME: &'static str = "PARAM_SET";
26306 const EXTRA_CRC: u8 = 168u8;
26307 const ENCODED_LEN: usize = 23usize;
26308 fn deser(
26309 _version: MavlinkVersion,
26310 __input: &[u8],
26311 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26312 let avail_len = __input.len();
26313 let mut payload_buf = [0; Self::ENCODED_LEN];
26314 let mut buf = if avail_len < Self::ENCODED_LEN {
26315 payload_buf[0..avail_len].copy_from_slice(__input);
26316 Bytes::new(&payload_buf)
26317 } else {
26318 Bytes::new(__input)
26319 };
26320 let mut __struct = Self::default();
26321 __struct.param_value = buf.get_f32_le()?;
26322 __struct.target_system = buf.get_u8()?;
26323 __struct.target_component = buf.get_u8()?;
26324 let mut tmp = [0_u8; 16usize];
26325 for v in &mut tmp {
26326 *v = buf.get_u8()?;
26327 }
26328 __struct.param_id = CharArray::new(tmp);
26329 let tmp = buf.get_u8()?;
26330 __struct.param_type =
26331 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26332 enum_type: "MavParamType",
26333 value: tmp as u64,
26334 })?;
26335 Ok(__struct)
26336 }
26337 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26338 let mut __tmp = BytesMut::new(bytes);
26339 #[allow(clippy::absurd_extreme_comparisons)]
26340 #[allow(unused_comparisons)]
26341 if __tmp.remaining() < Self::ENCODED_LEN {
26342 panic!(
26343 "buffer is too small (need {} bytes, but got {})",
26344 Self::ENCODED_LEN,
26345 __tmp.remaining(),
26346 )
26347 }
26348 __tmp.put_f32_le(self.param_value);
26349 __tmp.put_u8(self.target_system);
26350 __tmp.put_u8(self.target_component);
26351 for val in &self.param_id {
26352 __tmp.put_u8(*val);
26353 }
26354 __tmp.put_u8(self.param_type as u8);
26355 if matches!(version, MavlinkVersion::V2) {
26356 let len = __tmp.len();
26357 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26358 } else {
26359 __tmp.len()
26360 }
26361 }
26362}
26363#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26364#[doc = ""]
26365#[doc = "ID: 22"]
26366#[derive(Debug, Clone, PartialEq)]
26367#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26369#[cfg_attr(feature = "ts", derive(TS))]
26370#[cfg_attr(feature = "ts", ts(export))]
26371pub struct PARAM_VALUE_DATA {
26372 #[doc = "Onboard parameter value"]
26373 pub param_value: f32,
26374 #[doc = "Total number of onboard parameters"]
26375 pub param_count: u16,
26376 #[doc = "Index of this onboard parameter"]
26377 pub param_index: u16,
26378 #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26379 #[cfg_attr(feature = "ts", ts(type = "string"))]
26380 pub param_id: CharArray<16>,
26381 #[doc = "Onboard parameter type."]
26382 pub param_type: MavParamType,
26383}
26384impl PARAM_VALUE_DATA {
26385 pub const ENCODED_LEN: usize = 25usize;
26386 pub const DEFAULT: Self = Self {
26387 param_value: 0.0_f32,
26388 param_count: 0_u16,
26389 param_index: 0_u16,
26390 param_id: CharArray::new([0_u8; 16usize]),
26391 param_type: MavParamType::DEFAULT,
26392 };
26393 #[cfg(feature = "arbitrary")]
26394 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26395 use arbitrary::{Arbitrary, Unstructured};
26396 let mut buf = [0u8; 1024];
26397 rng.fill_bytes(&mut buf);
26398 let mut unstructured = Unstructured::new(&buf);
26399 Self::arbitrary(&mut unstructured).unwrap_or_default()
26400 }
26401}
26402impl Default for PARAM_VALUE_DATA {
26403 fn default() -> Self {
26404 Self::DEFAULT.clone()
26405 }
26406}
26407impl MessageData for PARAM_VALUE_DATA {
26408 type Message = MavMessage;
26409 const ID: u32 = 22u32;
26410 const NAME: &'static str = "PARAM_VALUE";
26411 const EXTRA_CRC: u8 = 220u8;
26412 const ENCODED_LEN: usize = 25usize;
26413 fn deser(
26414 _version: MavlinkVersion,
26415 __input: &[u8],
26416 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26417 let avail_len = __input.len();
26418 let mut payload_buf = [0; Self::ENCODED_LEN];
26419 let mut buf = if avail_len < Self::ENCODED_LEN {
26420 payload_buf[0..avail_len].copy_from_slice(__input);
26421 Bytes::new(&payload_buf)
26422 } else {
26423 Bytes::new(__input)
26424 };
26425 let mut __struct = Self::default();
26426 __struct.param_value = buf.get_f32_le()?;
26427 __struct.param_count = buf.get_u16_le()?;
26428 __struct.param_index = buf.get_u16_le()?;
26429 let mut tmp = [0_u8; 16usize];
26430 for v in &mut tmp {
26431 *v = buf.get_u8()?;
26432 }
26433 __struct.param_id = CharArray::new(tmp);
26434 let tmp = buf.get_u8()?;
26435 __struct.param_type =
26436 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26437 enum_type: "MavParamType",
26438 value: tmp as u64,
26439 })?;
26440 Ok(__struct)
26441 }
26442 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26443 let mut __tmp = BytesMut::new(bytes);
26444 #[allow(clippy::absurd_extreme_comparisons)]
26445 #[allow(unused_comparisons)]
26446 if __tmp.remaining() < Self::ENCODED_LEN {
26447 panic!(
26448 "buffer is too small (need {} bytes, but got {})",
26449 Self::ENCODED_LEN,
26450 __tmp.remaining(),
26451 )
26452 }
26453 __tmp.put_f32_le(self.param_value);
26454 __tmp.put_u16_le(self.param_count);
26455 __tmp.put_u16_le(self.param_index);
26456 for val in &self.param_id {
26457 __tmp.put_u8(*val);
26458 }
26459 __tmp.put_u8(self.param_type as u8);
26460 if matches!(version, MavlinkVersion::V2) {
26461 let len = __tmp.len();
26462 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26463 } else {
26464 __tmp.len()
26465 }
26466 }
26467}
26468#[deprecated = " See `TIMESYNC` (Superseded since 2011-08)"]
26469#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
26470#[doc = ""]
26471#[doc = "ID: 4"]
26472#[derive(Debug, Clone, PartialEq)]
26473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26475#[cfg_attr(feature = "ts", derive(TS))]
26476#[cfg_attr(feature = "ts", ts(export))]
26477pub struct PING_DATA {
26478 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26479 pub time_usec: u64,
26480 #[doc = "PING sequence"]
26481 pub seq: u32,
26482 #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
26483 pub target_system: u8,
26484 #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
26485 pub target_component: u8,
26486}
26487impl PING_DATA {
26488 pub const ENCODED_LEN: usize = 14usize;
26489 pub const DEFAULT: Self = Self {
26490 time_usec: 0_u64,
26491 seq: 0_u32,
26492 target_system: 0_u8,
26493 target_component: 0_u8,
26494 };
26495 #[cfg(feature = "arbitrary")]
26496 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26497 use arbitrary::{Arbitrary, Unstructured};
26498 let mut buf = [0u8; 1024];
26499 rng.fill_bytes(&mut buf);
26500 let mut unstructured = Unstructured::new(&buf);
26501 Self::arbitrary(&mut unstructured).unwrap_or_default()
26502 }
26503}
26504impl Default for PING_DATA {
26505 fn default() -> Self {
26506 Self::DEFAULT.clone()
26507 }
26508}
26509impl MessageData for PING_DATA {
26510 type Message = MavMessage;
26511 const ID: u32 = 4u32;
26512 const NAME: &'static str = "PING";
26513 const EXTRA_CRC: u8 = 237u8;
26514 const ENCODED_LEN: usize = 14usize;
26515 fn deser(
26516 _version: MavlinkVersion,
26517 __input: &[u8],
26518 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26519 let avail_len = __input.len();
26520 let mut payload_buf = [0; Self::ENCODED_LEN];
26521 let mut buf = if avail_len < Self::ENCODED_LEN {
26522 payload_buf[0..avail_len].copy_from_slice(__input);
26523 Bytes::new(&payload_buf)
26524 } else {
26525 Bytes::new(__input)
26526 };
26527 let mut __struct = Self::default();
26528 __struct.time_usec = buf.get_u64_le()?;
26529 __struct.seq = buf.get_u32_le()?;
26530 __struct.target_system = buf.get_u8()?;
26531 __struct.target_component = buf.get_u8()?;
26532 Ok(__struct)
26533 }
26534 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26535 let mut __tmp = BytesMut::new(bytes);
26536 #[allow(clippy::absurd_extreme_comparisons)]
26537 #[allow(unused_comparisons)]
26538 if __tmp.remaining() < Self::ENCODED_LEN {
26539 panic!(
26540 "buffer is too small (need {} bytes, but got {})",
26541 Self::ENCODED_LEN,
26542 __tmp.remaining(),
26543 )
26544 }
26545 __tmp.put_u64_le(self.time_usec);
26546 __tmp.put_u32_le(self.seq);
26547 __tmp.put_u8(self.target_system);
26548 __tmp.put_u8(self.target_component);
26549 if matches!(version, MavlinkVersion::V2) {
26550 let len = __tmp.len();
26551 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26552 } else {
26553 __tmp.len()
26554 }
26555 }
26556}
26557#[deprecated = " See `PLAY_TUNE_V2` (Superseded since 2019-10)"]
26558#[doc = "Control vehicle tone generation (buzzer)."]
26559#[doc = ""]
26560#[doc = "ID: 258"]
26561#[derive(Debug, Clone, PartialEq)]
26562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26564#[cfg_attr(feature = "ts", derive(TS))]
26565#[cfg_attr(feature = "ts", ts(export))]
26566pub struct PLAY_TUNE_DATA {
26567 #[doc = "System ID"]
26568 pub target_system: u8,
26569 #[doc = "Component ID"]
26570 pub target_component: u8,
26571 #[doc = "tune in board specific format"]
26572 #[cfg_attr(feature = "ts", ts(type = "string"))]
26573 pub tune: CharArray<30>,
26574 #[doc = "tune extension (appended to tune)"]
26575 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26576 #[cfg_attr(feature = "ts", ts(type = "string"))]
26577 pub tune2: CharArray<200>,
26578}
26579impl PLAY_TUNE_DATA {
26580 pub const ENCODED_LEN: usize = 232usize;
26581 pub const DEFAULT: Self = Self {
26582 target_system: 0_u8,
26583 target_component: 0_u8,
26584 tune: CharArray::new([0_u8; 30usize]),
26585 tune2: CharArray::new([0_u8; 200usize]),
26586 };
26587 #[cfg(feature = "arbitrary")]
26588 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26589 use arbitrary::{Arbitrary, Unstructured};
26590 let mut buf = [0u8; 1024];
26591 rng.fill_bytes(&mut buf);
26592 let mut unstructured = Unstructured::new(&buf);
26593 Self::arbitrary(&mut unstructured).unwrap_or_default()
26594 }
26595}
26596impl Default for PLAY_TUNE_DATA {
26597 fn default() -> Self {
26598 Self::DEFAULT.clone()
26599 }
26600}
26601impl MessageData for PLAY_TUNE_DATA {
26602 type Message = MavMessage;
26603 const ID: u32 = 258u32;
26604 const NAME: &'static str = "PLAY_TUNE";
26605 const EXTRA_CRC: u8 = 187u8;
26606 const ENCODED_LEN: usize = 232usize;
26607 fn deser(
26608 _version: MavlinkVersion,
26609 __input: &[u8],
26610 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26611 let avail_len = __input.len();
26612 let mut payload_buf = [0; Self::ENCODED_LEN];
26613 let mut buf = if avail_len < Self::ENCODED_LEN {
26614 payload_buf[0..avail_len].copy_from_slice(__input);
26615 Bytes::new(&payload_buf)
26616 } else {
26617 Bytes::new(__input)
26618 };
26619 let mut __struct = Self::default();
26620 __struct.target_system = buf.get_u8()?;
26621 __struct.target_component = buf.get_u8()?;
26622 let mut tmp = [0_u8; 30usize];
26623 for v in &mut tmp {
26624 *v = buf.get_u8()?;
26625 }
26626 __struct.tune = CharArray::new(tmp);
26627 let mut tmp = [0_u8; 200usize];
26628 for v in &mut tmp {
26629 *v = buf.get_u8()?;
26630 }
26631 __struct.tune2 = CharArray::new(tmp);
26632 Ok(__struct)
26633 }
26634 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26635 let mut __tmp = BytesMut::new(bytes);
26636 #[allow(clippy::absurd_extreme_comparisons)]
26637 #[allow(unused_comparisons)]
26638 if __tmp.remaining() < Self::ENCODED_LEN {
26639 panic!(
26640 "buffer is too small (need {} bytes, but got {})",
26641 Self::ENCODED_LEN,
26642 __tmp.remaining(),
26643 )
26644 }
26645 __tmp.put_u8(self.target_system);
26646 __tmp.put_u8(self.target_component);
26647 for val in &self.tune {
26648 __tmp.put_u8(*val);
26649 }
26650 if matches!(version, MavlinkVersion::V2) {
26651 for val in &self.tune2 {
26652 __tmp.put_u8(*val);
26653 }
26654 let len = __tmp.len();
26655 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26656 } else {
26657 __tmp.len()
26658 }
26659 }
26660}
26661#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
26662#[doc = ""]
26663#[doc = "ID: 400"]
26664#[derive(Debug, Clone, PartialEq)]
26665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26667#[cfg_attr(feature = "ts", derive(TS))]
26668#[cfg_attr(feature = "ts", ts(export))]
26669pub struct PLAY_TUNE_V2_DATA {
26670 #[doc = "Tune format"]
26671 pub format: TuneFormat,
26672 #[doc = "System ID"]
26673 pub target_system: u8,
26674 #[doc = "Component ID"]
26675 pub target_component: u8,
26676 #[doc = "Tune definition as a NULL-terminated string."]
26677 #[cfg_attr(feature = "ts", ts(type = "string"))]
26678 pub tune: CharArray<248>,
26679}
26680impl PLAY_TUNE_V2_DATA {
26681 pub const ENCODED_LEN: usize = 254usize;
26682 pub const DEFAULT: Self = Self {
26683 format: TuneFormat::DEFAULT,
26684 target_system: 0_u8,
26685 target_component: 0_u8,
26686 tune: CharArray::new([0_u8; 248usize]),
26687 };
26688 #[cfg(feature = "arbitrary")]
26689 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26690 use arbitrary::{Arbitrary, Unstructured};
26691 let mut buf = [0u8; 1024];
26692 rng.fill_bytes(&mut buf);
26693 let mut unstructured = Unstructured::new(&buf);
26694 Self::arbitrary(&mut unstructured).unwrap_or_default()
26695 }
26696}
26697impl Default for PLAY_TUNE_V2_DATA {
26698 fn default() -> Self {
26699 Self::DEFAULT.clone()
26700 }
26701}
26702impl MessageData for PLAY_TUNE_V2_DATA {
26703 type Message = MavMessage;
26704 const ID: u32 = 400u32;
26705 const NAME: &'static str = "PLAY_TUNE_V2";
26706 const EXTRA_CRC: u8 = 110u8;
26707 const ENCODED_LEN: usize = 254usize;
26708 fn deser(
26709 _version: MavlinkVersion,
26710 __input: &[u8],
26711 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26712 let avail_len = __input.len();
26713 let mut payload_buf = [0; Self::ENCODED_LEN];
26714 let mut buf = if avail_len < Self::ENCODED_LEN {
26715 payload_buf[0..avail_len].copy_from_slice(__input);
26716 Bytes::new(&payload_buf)
26717 } else {
26718 Bytes::new(__input)
26719 };
26720 let mut __struct = Self::default();
26721 let tmp = buf.get_u32_le()?;
26722 __struct.format = FromPrimitive::from_u32(tmp).ok_or(
26723 ::mavlink_core::error::ParserError::InvalidEnum {
26724 enum_type: "TuneFormat",
26725 value: tmp as u64,
26726 },
26727 )?;
26728 __struct.target_system = buf.get_u8()?;
26729 __struct.target_component = buf.get_u8()?;
26730 let mut tmp = [0_u8; 248usize];
26731 for v in &mut tmp {
26732 *v = buf.get_u8()?;
26733 }
26734 __struct.tune = CharArray::new(tmp);
26735 Ok(__struct)
26736 }
26737 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26738 let mut __tmp = BytesMut::new(bytes);
26739 #[allow(clippy::absurd_extreme_comparisons)]
26740 #[allow(unused_comparisons)]
26741 if __tmp.remaining() < Self::ENCODED_LEN {
26742 panic!(
26743 "buffer is too small (need {} bytes, but got {})",
26744 Self::ENCODED_LEN,
26745 __tmp.remaining(),
26746 )
26747 }
26748 __tmp.put_u32_le(self.format as u32);
26749 __tmp.put_u8(self.target_system);
26750 __tmp.put_u8(self.target_component);
26751 for val in &self.tune {
26752 __tmp.put_u8(*val);
26753 }
26754 if matches!(version, MavlinkVersion::V2) {
26755 let len = __tmp.len();
26756 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26757 } else {
26758 __tmp.len()
26759 }
26760 }
26761}
26762#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
26763#[doc = ""]
26764#[doc = "ID: 87"]
26765#[derive(Debug, Clone, PartialEq)]
26766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26768#[cfg_attr(feature = "ts", derive(TS))]
26769#[cfg_attr(feature = "ts", ts(export))]
26770pub struct POSITION_TARGET_GLOBAL_INT_DATA {
26771 #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
26772 pub time_boot_ms: u32,
26773 #[doc = "Latitude in WGS84 frame"]
26774 pub lat_int: i32,
26775 #[doc = "Longitude in WGS84 frame"]
26776 pub lon_int: i32,
26777 #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
26778 pub alt: f32,
26779 #[doc = "X velocity in NED frame"]
26780 pub vx: f32,
26781 #[doc = "Y velocity in NED frame"]
26782 pub vy: f32,
26783 #[doc = "Z velocity in NED frame"]
26784 pub vz: f32,
26785 #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26786 pub afx: f32,
26787 #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26788 pub afy: f32,
26789 #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26790 pub afz: f32,
26791 #[doc = "yaw setpoint"]
26792 pub yaw: f32,
26793 #[doc = "yaw rate setpoint"]
26794 pub yaw_rate: f32,
26795 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
26796 pub type_mask: PositionTargetTypemask,
26797 #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
26798 pub coordinate_frame: MavFrame,
26799}
26800impl POSITION_TARGET_GLOBAL_INT_DATA {
26801 pub const ENCODED_LEN: usize = 51usize;
26802 pub const DEFAULT: Self = Self {
26803 time_boot_ms: 0_u32,
26804 lat_int: 0_i32,
26805 lon_int: 0_i32,
26806 alt: 0.0_f32,
26807 vx: 0.0_f32,
26808 vy: 0.0_f32,
26809 vz: 0.0_f32,
26810 afx: 0.0_f32,
26811 afy: 0.0_f32,
26812 afz: 0.0_f32,
26813 yaw: 0.0_f32,
26814 yaw_rate: 0.0_f32,
26815 type_mask: PositionTargetTypemask::DEFAULT,
26816 coordinate_frame: MavFrame::DEFAULT,
26817 };
26818 #[cfg(feature = "arbitrary")]
26819 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26820 use arbitrary::{Arbitrary, Unstructured};
26821 let mut buf = [0u8; 1024];
26822 rng.fill_bytes(&mut buf);
26823 let mut unstructured = Unstructured::new(&buf);
26824 Self::arbitrary(&mut unstructured).unwrap_or_default()
26825 }
26826}
26827impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
26828 fn default() -> Self {
26829 Self::DEFAULT.clone()
26830 }
26831}
26832impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
26833 type Message = MavMessage;
26834 const ID: u32 = 87u32;
26835 const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
26836 const EXTRA_CRC: u8 = 150u8;
26837 const ENCODED_LEN: usize = 51usize;
26838 fn deser(
26839 _version: MavlinkVersion,
26840 __input: &[u8],
26841 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26842 let avail_len = __input.len();
26843 let mut payload_buf = [0; Self::ENCODED_LEN];
26844 let mut buf = if avail_len < Self::ENCODED_LEN {
26845 payload_buf[0..avail_len].copy_from_slice(__input);
26846 Bytes::new(&payload_buf)
26847 } else {
26848 Bytes::new(__input)
26849 };
26850 let mut __struct = Self::default();
26851 __struct.time_boot_ms = buf.get_u32_le()?;
26852 __struct.lat_int = buf.get_i32_le()?;
26853 __struct.lon_int = buf.get_i32_le()?;
26854 __struct.alt = buf.get_f32_le()?;
26855 __struct.vx = buf.get_f32_le()?;
26856 __struct.vy = buf.get_f32_le()?;
26857 __struct.vz = buf.get_f32_le()?;
26858 __struct.afx = buf.get_f32_le()?;
26859 __struct.afy = buf.get_f32_le()?;
26860 __struct.afz = buf.get_f32_le()?;
26861 __struct.yaw = buf.get_f32_le()?;
26862 __struct.yaw_rate = buf.get_f32_le()?;
26863 let tmp = buf.get_u16_le()?;
26864 __struct.type_mask =
26865 PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
26866 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26867 flag_type: "PositionTargetTypemask",
26868 value: tmp as u64,
26869 })?;
26870 let tmp = buf.get_u8()?;
26871 __struct.coordinate_frame =
26872 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26873 enum_type: "MavFrame",
26874 value: tmp as u64,
26875 })?;
26876 Ok(__struct)
26877 }
26878 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26879 let mut __tmp = BytesMut::new(bytes);
26880 #[allow(clippy::absurd_extreme_comparisons)]
26881 #[allow(unused_comparisons)]
26882 if __tmp.remaining() < Self::ENCODED_LEN {
26883 panic!(
26884 "buffer is too small (need {} bytes, but got {})",
26885 Self::ENCODED_LEN,
26886 __tmp.remaining(),
26887 )
26888 }
26889 __tmp.put_u32_le(self.time_boot_ms);
26890 __tmp.put_i32_le(self.lat_int);
26891 __tmp.put_i32_le(self.lon_int);
26892 __tmp.put_f32_le(self.alt);
26893 __tmp.put_f32_le(self.vx);
26894 __tmp.put_f32_le(self.vy);
26895 __tmp.put_f32_le(self.vz);
26896 __tmp.put_f32_le(self.afx);
26897 __tmp.put_f32_le(self.afy);
26898 __tmp.put_f32_le(self.afz);
26899 __tmp.put_f32_le(self.yaw);
26900 __tmp.put_f32_le(self.yaw_rate);
26901 __tmp.put_u16_le(self.type_mask.bits() as u16);
26902 __tmp.put_u8(self.coordinate_frame as u8);
26903 if matches!(version, MavlinkVersion::V2) {
26904 let len = __tmp.len();
26905 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26906 } else {
26907 __tmp.len()
26908 }
26909 }
26910}
26911#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
26912#[doc = ""]
26913#[doc = "ID: 85"]
26914#[derive(Debug, Clone, PartialEq)]
26915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26917#[cfg_attr(feature = "ts", derive(TS))]
26918#[cfg_attr(feature = "ts", ts(export))]
26919pub struct POSITION_TARGET_LOCAL_NED_DATA {
26920 #[doc = "Timestamp (time since system boot)."]
26921 pub time_boot_ms: u32,
26922 #[doc = "X Position in NED frame"]
26923 pub x: f32,
26924 #[doc = "Y Position in NED frame"]
26925 pub y: f32,
26926 #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
26927 pub z: f32,
26928 #[doc = "X velocity in NED frame"]
26929 pub vx: f32,
26930 #[doc = "Y velocity in NED frame"]
26931 pub vy: f32,
26932 #[doc = "Z velocity in NED frame"]
26933 pub vz: f32,
26934 #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26935 pub afx: f32,
26936 #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26937 pub afy: f32,
26938 #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26939 pub afz: f32,
26940 #[doc = "yaw setpoint"]
26941 pub yaw: f32,
26942 #[doc = "yaw rate setpoint"]
26943 pub yaw_rate: f32,
26944 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
26945 pub type_mask: PositionTargetTypemask,
26946 #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
26947 pub coordinate_frame: MavFrame,
26948}
26949impl POSITION_TARGET_LOCAL_NED_DATA {
26950 pub const ENCODED_LEN: usize = 51usize;
26951 pub const DEFAULT: Self = Self {
26952 time_boot_ms: 0_u32,
26953 x: 0.0_f32,
26954 y: 0.0_f32,
26955 z: 0.0_f32,
26956 vx: 0.0_f32,
26957 vy: 0.0_f32,
26958 vz: 0.0_f32,
26959 afx: 0.0_f32,
26960 afy: 0.0_f32,
26961 afz: 0.0_f32,
26962 yaw: 0.0_f32,
26963 yaw_rate: 0.0_f32,
26964 type_mask: PositionTargetTypemask::DEFAULT,
26965 coordinate_frame: MavFrame::DEFAULT,
26966 };
26967 #[cfg(feature = "arbitrary")]
26968 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26969 use arbitrary::{Arbitrary, Unstructured};
26970 let mut buf = [0u8; 1024];
26971 rng.fill_bytes(&mut buf);
26972 let mut unstructured = Unstructured::new(&buf);
26973 Self::arbitrary(&mut unstructured).unwrap_or_default()
26974 }
26975}
26976impl Default for POSITION_TARGET_LOCAL_NED_DATA {
26977 fn default() -> Self {
26978 Self::DEFAULT.clone()
26979 }
26980}
26981impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
26982 type Message = MavMessage;
26983 const ID: u32 = 85u32;
26984 const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
26985 const EXTRA_CRC: u8 = 140u8;
26986 const ENCODED_LEN: usize = 51usize;
26987 fn deser(
26988 _version: MavlinkVersion,
26989 __input: &[u8],
26990 ) -> Result<Self, ::mavlink_core::error::ParserError> {
26991 let avail_len = __input.len();
26992 let mut payload_buf = [0; Self::ENCODED_LEN];
26993 let mut buf = if avail_len < Self::ENCODED_LEN {
26994 payload_buf[0..avail_len].copy_from_slice(__input);
26995 Bytes::new(&payload_buf)
26996 } else {
26997 Bytes::new(__input)
26998 };
26999 let mut __struct = Self::default();
27000 __struct.time_boot_ms = buf.get_u32_le()?;
27001 __struct.x = buf.get_f32_le()?;
27002 __struct.y = buf.get_f32_le()?;
27003 __struct.z = buf.get_f32_le()?;
27004 __struct.vx = buf.get_f32_le()?;
27005 __struct.vy = buf.get_f32_le()?;
27006 __struct.vz = buf.get_f32_le()?;
27007 __struct.afx = buf.get_f32_le()?;
27008 __struct.afy = buf.get_f32_le()?;
27009 __struct.afz = buf.get_f32_le()?;
27010 __struct.yaw = buf.get_f32_le()?;
27011 __struct.yaw_rate = buf.get_f32_le()?;
27012 let tmp = buf.get_u16_le()?;
27013 __struct.type_mask =
27014 PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
27015 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27016 flag_type: "PositionTargetTypemask",
27017 value: tmp as u64,
27018 })?;
27019 let tmp = buf.get_u8()?;
27020 __struct.coordinate_frame =
27021 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27022 enum_type: "MavFrame",
27023 value: tmp as u64,
27024 })?;
27025 Ok(__struct)
27026 }
27027 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27028 let mut __tmp = BytesMut::new(bytes);
27029 #[allow(clippy::absurd_extreme_comparisons)]
27030 #[allow(unused_comparisons)]
27031 if __tmp.remaining() < Self::ENCODED_LEN {
27032 panic!(
27033 "buffer is too small (need {} bytes, but got {})",
27034 Self::ENCODED_LEN,
27035 __tmp.remaining(),
27036 )
27037 }
27038 __tmp.put_u32_le(self.time_boot_ms);
27039 __tmp.put_f32_le(self.x);
27040 __tmp.put_f32_le(self.y);
27041 __tmp.put_f32_le(self.z);
27042 __tmp.put_f32_le(self.vx);
27043 __tmp.put_f32_le(self.vy);
27044 __tmp.put_f32_le(self.vz);
27045 __tmp.put_f32_le(self.afx);
27046 __tmp.put_f32_le(self.afy);
27047 __tmp.put_f32_le(self.afz);
27048 __tmp.put_f32_le(self.yaw);
27049 __tmp.put_f32_le(self.yaw_rate);
27050 __tmp.put_u16_le(self.type_mask.bits() as u16);
27051 __tmp.put_u8(self.coordinate_frame as u8);
27052 if matches!(version, MavlinkVersion::V2) {
27053 let len = __tmp.len();
27054 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27055 } else {
27056 __tmp.len()
27057 }
27058 }
27059}
27060#[doc = "Power supply status."]
27061#[doc = ""]
27062#[doc = "ID: 125"]
27063#[derive(Debug, Clone, PartialEq)]
27064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27066#[cfg_attr(feature = "ts", derive(TS))]
27067#[cfg_attr(feature = "ts", ts(export))]
27068pub struct POWER_STATUS_DATA {
27069 #[doc = "5V rail voltage."]
27070 pub Vcc: u16,
27071 #[doc = "Servo rail voltage."]
27072 pub Vservo: u16,
27073 #[doc = "Bitmap of power supply status flags."]
27074 pub flags: MavPowerStatus,
27075}
27076impl POWER_STATUS_DATA {
27077 pub const ENCODED_LEN: usize = 6usize;
27078 pub const DEFAULT: Self = Self {
27079 Vcc: 0_u16,
27080 Vservo: 0_u16,
27081 flags: MavPowerStatus::DEFAULT,
27082 };
27083 #[cfg(feature = "arbitrary")]
27084 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27085 use arbitrary::{Arbitrary, Unstructured};
27086 let mut buf = [0u8; 1024];
27087 rng.fill_bytes(&mut buf);
27088 let mut unstructured = Unstructured::new(&buf);
27089 Self::arbitrary(&mut unstructured).unwrap_or_default()
27090 }
27091}
27092impl Default for POWER_STATUS_DATA {
27093 fn default() -> Self {
27094 Self::DEFAULT.clone()
27095 }
27096}
27097impl MessageData for POWER_STATUS_DATA {
27098 type Message = MavMessage;
27099 const ID: u32 = 125u32;
27100 const NAME: &'static str = "POWER_STATUS";
27101 const EXTRA_CRC: u8 = 203u8;
27102 const ENCODED_LEN: usize = 6usize;
27103 fn deser(
27104 _version: MavlinkVersion,
27105 __input: &[u8],
27106 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27107 let avail_len = __input.len();
27108 let mut payload_buf = [0; Self::ENCODED_LEN];
27109 let mut buf = if avail_len < Self::ENCODED_LEN {
27110 payload_buf[0..avail_len].copy_from_slice(__input);
27111 Bytes::new(&payload_buf)
27112 } else {
27113 Bytes::new(__input)
27114 };
27115 let mut __struct = Self::default();
27116 __struct.Vcc = buf.get_u16_le()?;
27117 __struct.Vservo = buf.get_u16_le()?;
27118 let tmp = buf.get_u16_le()?;
27119 __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
27120 ::mavlink_core::error::ParserError::InvalidFlag {
27121 flag_type: "MavPowerStatus",
27122 value: tmp as u64,
27123 },
27124 )?;
27125 Ok(__struct)
27126 }
27127 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27128 let mut __tmp = BytesMut::new(bytes);
27129 #[allow(clippy::absurd_extreme_comparisons)]
27130 #[allow(unused_comparisons)]
27131 if __tmp.remaining() < Self::ENCODED_LEN {
27132 panic!(
27133 "buffer is too small (need {} bytes, but got {})",
27134 Self::ENCODED_LEN,
27135 __tmp.remaining(),
27136 )
27137 }
27138 __tmp.put_u16_le(self.Vcc);
27139 __tmp.put_u16_le(self.Vservo);
27140 __tmp.put_u16_le(self.flags.bits() as u16);
27141 if matches!(version, MavlinkVersion::V2) {
27142 let len = __tmp.len();
27143 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27144 } else {
27145 __tmp.len()
27146 }
27147 }
27148}
27149#[deprecated = "No longer needed. Support is being removed from flight stacks. See `Nothing` (Deprecated since 2025-11)"]
27150#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
27151#[doc = ""]
27152#[doc = "ID: 300"]
27153#[derive(Debug, Clone, PartialEq)]
27154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27156#[cfg_attr(feature = "ts", derive(TS))]
27157#[cfg_attr(feature = "ts", ts(export))]
27158pub struct PROTOCOL_VERSION_DATA {
27159 #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
27160 pub version: u16,
27161 #[doc = "Minimum MAVLink version supported"]
27162 pub min_version: u16,
27163 #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
27164 pub max_version: u16,
27165 #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
27166 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27167 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27168 pub spec_version_hash: [u8; 8],
27169 #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
27170 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27171 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27172 pub library_version_hash: [u8; 8],
27173}
27174impl PROTOCOL_VERSION_DATA {
27175 pub const ENCODED_LEN: usize = 22usize;
27176 pub const DEFAULT: Self = Self {
27177 version: 0_u16,
27178 min_version: 0_u16,
27179 max_version: 0_u16,
27180 spec_version_hash: [0_u8; 8usize],
27181 library_version_hash: [0_u8; 8usize],
27182 };
27183 #[cfg(feature = "arbitrary")]
27184 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27185 use arbitrary::{Arbitrary, Unstructured};
27186 let mut buf = [0u8; 1024];
27187 rng.fill_bytes(&mut buf);
27188 let mut unstructured = Unstructured::new(&buf);
27189 Self::arbitrary(&mut unstructured).unwrap_or_default()
27190 }
27191}
27192impl Default for PROTOCOL_VERSION_DATA {
27193 fn default() -> Self {
27194 Self::DEFAULT.clone()
27195 }
27196}
27197impl MessageData for PROTOCOL_VERSION_DATA {
27198 type Message = MavMessage;
27199 const ID: u32 = 300u32;
27200 const NAME: &'static str = "PROTOCOL_VERSION";
27201 const EXTRA_CRC: u8 = 217u8;
27202 const ENCODED_LEN: usize = 22usize;
27203 fn deser(
27204 _version: MavlinkVersion,
27205 __input: &[u8],
27206 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27207 let avail_len = __input.len();
27208 let mut payload_buf = [0; Self::ENCODED_LEN];
27209 let mut buf = if avail_len < Self::ENCODED_LEN {
27210 payload_buf[0..avail_len].copy_from_slice(__input);
27211 Bytes::new(&payload_buf)
27212 } else {
27213 Bytes::new(__input)
27214 };
27215 let mut __struct = Self::default();
27216 __struct.version = buf.get_u16_le()?;
27217 __struct.min_version = buf.get_u16_le()?;
27218 __struct.max_version = buf.get_u16_le()?;
27219 for v in &mut __struct.spec_version_hash {
27220 let val = buf.get_u8()?;
27221 *v = val;
27222 }
27223 for v in &mut __struct.library_version_hash {
27224 let val = buf.get_u8()?;
27225 *v = val;
27226 }
27227 Ok(__struct)
27228 }
27229 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27230 let mut __tmp = BytesMut::new(bytes);
27231 #[allow(clippy::absurd_extreme_comparisons)]
27232 #[allow(unused_comparisons)]
27233 if __tmp.remaining() < Self::ENCODED_LEN {
27234 panic!(
27235 "buffer is too small (need {} bytes, but got {})",
27236 Self::ENCODED_LEN,
27237 __tmp.remaining(),
27238 )
27239 }
27240 __tmp.put_u16_le(self.version);
27241 __tmp.put_u16_le(self.min_version);
27242 __tmp.put_u16_le(self.max_version);
27243 for val in &self.spec_version_hash {
27244 __tmp.put_u8(*val);
27245 }
27246 for val in &self.library_version_hash {
27247 __tmp.put_u8(*val);
27248 }
27249 if matches!(version, MavlinkVersion::V2) {
27250 let len = __tmp.len();
27251 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27252 } else {
27253 __tmp.len()
27254 }
27255 }
27256}
27257#[doc = "Status generated by radio and injected into MAVLink stream."]
27258#[doc = ""]
27259#[doc = "ID: 109"]
27260#[derive(Debug, Clone, PartialEq)]
27261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27263#[cfg_attr(feature = "ts", derive(TS))]
27264#[cfg_attr(feature = "ts", ts(export))]
27265pub struct RADIO_STATUS_DATA {
27266 #[doc = "Count of radio packet receive errors (since boot)."]
27267 pub rxerrors: u16,
27268 #[doc = "Count of error corrected radio packets (since boot)."]
27269 pub fixed: u16,
27270 #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27271 pub rssi: u8,
27272 #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27273 pub remrssi: u8,
27274 #[doc = "Remaining free transmitter buffer space."]
27275 pub txbuf: u8,
27276 #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
27277 pub noise: u8,
27278 #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
27279 pub remnoise: u8,
27280}
27281impl RADIO_STATUS_DATA {
27282 pub const ENCODED_LEN: usize = 9usize;
27283 pub const DEFAULT: Self = Self {
27284 rxerrors: 0_u16,
27285 fixed: 0_u16,
27286 rssi: 0_u8,
27287 remrssi: 0_u8,
27288 txbuf: 0_u8,
27289 noise: 0_u8,
27290 remnoise: 0_u8,
27291 };
27292 #[cfg(feature = "arbitrary")]
27293 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27294 use arbitrary::{Arbitrary, Unstructured};
27295 let mut buf = [0u8; 1024];
27296 rng.fill_bytes(&mut buf);
27297 let mut unstructured = Unstructured::new(&buf);
27298 Self::arbitrary(&mut unstructured).unwrap_or_default()
27299 }
27300}
27301impl Default for RADIO_STATUS_DATA {
27302 fn default() -> Self {
27303 Self::DEFAULT.clone()
27304 }
27305}
27306impl MessageData for RADIO_STATUS_DATA {
27307 type Message = MavMessage;
27308 const ID: u32 = 109u32;
27309 const NAME: &'static str = "RADIO_STATUS";
27310 const EXTRA_CRC: u8 = 185u8;
27311 const ENCODED_LEN: usize = 9usize;
27312 fn deser(
27313 _version: MavlinkVersion,
27314 __input: &[u8],
27315 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27316 let avail_len = __input.len();
27317 let mut payload_buf = [0; Self::ENCODED_LEN];
27318 let mut buf = if avail_len < Self::ENCODED_LEN {
27319 payload_buf[0..avail_len].copy_from_slice(__input);
27320 Bytes::new(&payload_buf)
27321 } else {
27322 Bytes::new(__input)
27323 };
27324 let mut __struct = Self::default();
27325 __struct.rxerrors = buf.get_u16_le()?;
27326 __struct.fixed = buf.get_u16_le()?;
27327 __struct.rssi = buf.get_u8()?;
27328 __struct.remrssi = buf.get_u8()?;
27329 __struct.txbuf = buf.get_u8()?;
27330 __struct.noise = buf.get_u8()?;
27331 __struct.remnoise = buf.get_u8()?;
27332 Ok(__struct)
27333 }
27334 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27335 let mut __tmp = BytesMut::new(bytes);
27336 #[allow(clippy::absurd_extreme_comparisons)]
27337 #[allow(unused_comparisons)]
27338 if __tmp.remaining() < Self::ENCODED_LEN {
27339 panic!(
27340 "buffer is too small (need {} bytes, but got {})",
27341 Self::ENCODED_LEN,
27342 __tmp.remaining(),
27343 )
27344 }
27345 __tmp.put_u16_le(self.rxerrors);
27346 __tmp.put_u16_le(self.fixed);
27347 __tmp.put_u8(self.rssi);
27348 __tmp.put_u8(self.remrssi);
27349 __tmp.put_u8(self.txbuf);
27350 __tmp.put_u8(self.noise);
27351 __tmp.put_u8(self.remnoise);
27352 if matches!(version, MavlinkVersion::V2) {
27353 let len = __tmp.len();
27354 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27355 } else {
27356 __tmp.len()
27357 }
27358 }
27359}
27360#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
27361#[doc = ""]
27362#[doc = "ID: 27"]
27363#[derive(Debug, Clone, PartialEq)]
27364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27366#[cfg_attr(feature = "ts", derive(TS))]
27367#[cfg_attr(feature = "ts", ts(export))]
27368pub struct RAW_IMU_DATA {
27369 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27370 pub time_usec: u64,
27371 #[doc = "X acceleration (raw)"]
27372 pub xacc: i16,
27373 #[doc = "Y acceleration (raw)"]
27374 pub yacc: i16,
27375 #[doc = "Z acceleration (raw)"]
27376 pub zacc: i16,
27377 #[doc = "Angular speed around X axis (raw)"]
27378 pub xgyro: i16,
27379 #[doc = "Angular speed around Y axis (raw)"]
27380 pub ygyro: i16,
27381 #[doc = "Angular speed around Z axis (raw)"]
27382 pub zgyro: i16,
27383 #[doc = "X Magnetic field (raw)"]
27384 pub xmag: i16,
27385 #[doc = "Y Magnetic field (raw)"]
27386 pub ymag: i16,
27387 #[doc = "Z Magnetic field (raw)"]
27388 pub zmag: i16,
27389 #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
27390 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27391 pub id: u8,
27392 #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27393 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27394 pub temperature: i16,
27395}
27396impl RAW_IMU_DATA {
27397 pub const ENCODED_LEN: usize = 29usize;
27398 pub const DEFAULT: Self = Self {
27399 time_usec: 0_u64,
27400 xacc: 0_i16,
27401 yacc: 0_i16,
27402 zacc: 0_i16,
27403 xgyro: 0_i16,
27404 ygyro: 0_i16,
27405 zgyro: 0_i16,
27406 xmag: 0_i16,
27407 ymag: 0_i16,
27408 zmag: 0_i16,
27409 id: 0_u8,
27410 temperature: 0_i16,
27411 };
27412 #[cfg(feature = "arbitrary")]
27413 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27414 use arbitrary::{Arbitrary, Unstructured};
27415 let mut buf = [0u8; 1024];
27416 rng.fill_bytes(&mut buf);
27417 let mut unstructured = Unstructured::new(&buf);
27418 Self::arbitrary(&mut unstructured).unwrap_or_default()
27419 }
27420}
27421impl Default for RAW_IMU_DATA {
27422 fn default() -> Self {
27423 Self::DEFAULT.clone()
27424 }
27425}
27426impl MessageData for RAW_IMU_DATA {
27427 type Message = MavMessage;
27428 const ID: u32 = 27u32;
27429 const NAME: &'static str = "RAW_IMU";
27430 const EXTRA_CRC: u8 = 144u8;
27431 const ENCODED_LEN: usize = 29usize;
27432 fn deser(
27433 _version: MavlinkVersion,
27434 __input: &[u8],
27435 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27436 let avail_len = __input.len();
27437 let mut payload_buf = [0; Self::ENCODED_LEN];
27438 let mut buf = if avail_len < Self::ENCODED_LEN {
27439 payload_buf[0..avail_len].copy_from_slice(__input);
27440 Bytes::new(&payload_buf)
27441 } else {
27442 Bytes::new(__input)
27443 };
27444 let mut __struct = Self::default();
27445 __struct.time_usec = buf.get_u64_le()?;
27446 __struct.xacc = buf.get_i16_le()?;
27447 __struct.yacc = buf.get_i16_le()?;
27448 __struct.zacc = buf.get_i16_le()?;
27449 __struct.xgyro = buf.get_i16_le()?;
27450 __struct.ygyro = buf.get_i16_le()?;
27451 __struct.zgyro = buf.get_i16_le()?;
27452 __struct.xmag = buf.get_i16_le()?;
27453 __struct.ymag = buf.get_i16_le()?;
27454 __struct.zmag = buf.get_i16_le()?;
27455 __struct.id = buf.get_u8()?;
27456 __struct.temperature = buf.get_i16_le()?;
27457 Ok(__struct)
27458 }
27459 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27460 let mut __tmp = BytesMut::new(bytes);
27461 #[allow(clippy::absurd_extreme_comparisons)]
27462 #[allow(unused_comparisons)]
27463 if __tmp.remaining() < Self::ENCODED_LEN {
27464 panic!(
27465 "buffer is too small (need {} bytes, but got {})",
27466 Self::ENCODED_LEN,
27467 __tmp.remaining(),
27468 )
27469 }
27470 __tmp.put_u64_le(self.time_usec);
27471 __tmp.put_i16_le(self.xacc);
27472 __tmp.put_i16_le(self.yacc);
27473 __tmp.put_i16_le(self.zacc);
27474 __tmp.put_i16_le(self.xgyro);
27475 __tmp.put_i16_le(self.ygyro);
27476 __tmp.put_i16_le(self.zgyro);
27477 __tmp.put_i16_le(self.xmag);
27478 __tmp.put_i16_le(self.ymag);
27479 __tmp.put_i16_le(self.zmag);
27480 if matches!(version, MavlinkVersion::V2) {
27481 __tmp.put_u8(self.id);
27482 __tmp.put_i16_le(self.temperature);
27483 let len = __tmp.len();
27484 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27485 } else {
27486 __tmp.len()
27487 }
27488 }
27489}
27490#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
27491#[doc = ""]
27492#[doc = "ID: 28"]
27493#[derive(Debug, Clone, PartialEq)]
27494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27495#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27496#[cfg_attr(feature = "ts", derive(TS))]
27497#[cfg_attr(feature = "ts", ts(export))]
27498pub struct RAW_PRESSURE_DATA {
27499 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27500 pub time_usec: u64,
27501 #[doc = "Absolute pressure (raw)"]
27502 pub press_abs: i16,
27503 #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
27504 pub press_diff1: i16,
27505 #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
27506 pub press_diff2: i16,
27507 #[doc = "Raw Temperature measurement (raw)"]
27508 pub temperature: i16,
27509}
27510impl RAW_PRESSURE_DATA {
27511 pub const ENCODED_LEN: usize = 16usize;
27512 pub const DEFAULT: Self = Self {
27513 time_usec: 0_u64,
27514 press_abs: 0_i16,
27515 press_diff1: 0_i16,
27516 press_diff2: 0_i16,
27517 temperature: 0_i16,
27518 };
27519 #[cfg(feature = "arbitrary")]
27520 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27521 use arbitrary::{Arbitrary, Unstructured};
27522 let mut buf = [0u8; 1024];
27523 rng.fill_bytes(&mut buf);
27524 let mut unstructured = Unstructured::new(&buf);
27525 Self::arbitrary(&mut unstructured).unwrap_or_default()
27526 }
27527}
27528impl Default for RAW_PRESSURE_DATA {
27529 fn default() -> Self {
27530 Self::DEFAULT.clone()
27531 }
27532}
27533impl MessageData for RAW_PRESSURE_DATA {
27534 type Message = MavMessage;
27535 const ID: u32 = 28u32;
27536 const NAME: &'static str = "RAW_PRESSURE";
27537 const EXTRA_CRC: u8 = 67u8;
27538 const ENCODED_LEN: usize = 16usize;
27539 fn deser(
27540 _version: MavlinkVersion,
27541 __input: &[u8],
27542 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27543 let avail_len = __input.len();
27544 let mut payload_buf = [0; Self::ENCODED_LEN];
27545 let mut buf = if avail_len < Self::ENCODED_LEN {
27546 payload_buf[0..avail_len].copy_from_slice(__input);
27547 Bytes::new(&payload_buf)
27548 } else {
27549 Bytes::new(__input)
27550 };
27551 let mut __struct = Self::default();
27552 __struct.time_usec = buf.get_u64_le()?;
27553 __struct.press_abs = buf.get_i16_le()?;
27554 __struct.press_diff1 = buf.get_i16_le()?;
27555 __struct.press_diff2 = buf.get_i16_le()?;
27556 __struct.temperature = buf.get_i16_le()?;
27557 Ok(__struct)
27558 }
27559 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27560 let mut __tmp = BytesMut::new(bytes);
27561 #[allow(clippy::absurd_extreme_comparisons)]
27562 #[allow(unused_comparisons)]
27563 if __tmp.remaining() < Self::ENCODED_LEN {
27564 panic!(
27565 "buffer is too small (need {} bytes, but got {})",
27566 Self::ENCODED_LEN,
27567 __tmp.remaining(),
27568 )
27569 }
27570 __tmp.put_u64_le(self.time_usec);
27571 __tmp.put_i16_le(self.press_abs);
27572 __tmp.put_i16_le(self.press_diff1);
27573 __tmp.put_i16_le(self.press_diff2);
27574 __tmp.put_i16_le(self.temperature);
27575 if matches!(version, MavlinkVersion::V2) {
27576 let len = __tmp.len();
27577 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27578 } else {
27579 __tmp.len()
27580 }
27581 }
27582}
27583#[doc = "RPM sensor data message."]
27584#[doc = ""]
27585#[doc = "ID: 339"]
27586#[derive(Debug, Clone, PartialEq)]
27587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27589#[cfg_attr(feature = "ts", derive(TS))]
27590#[cfg_attr(feature = "ts", ts(export))]
27591pub struct RAW_RPM_DATA {
27592 #[doc = "Indicated rate"]
27593 pub frequency: f32,
27594 #[doc = "Index of this RPM sensor (0-indexed)"]
27595 pub index: u8,
27596}
27597impl RAW_RPM_DATA {
27598 pub const ENCODED_LEN: usize = 5usize;
27599 pub const DEFAULT: Self = Self {
27600 frequency: 0.0_f32,
27601 index: 0_u8,
27602 };
27603 #[cfg(feature = "arbitrary")]
27604 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27605 use arbitrary::{Arbitrary, Unstructured};
27606 let mut buf = [0u8; 1024];
27607 rng.fill_bytes(&mut buf);
27608 let mut unstructured = Unstructured::new(&buf);
27609 Self::arbitrary(&mut unstructured).unwrap_or_default()
27610 }
27611}
27612impl Default for RAW_RPM_DATA {
27613 fn default() -> Self {
27614 Self::DEFAULT.clone()
27615 }
27616}
27617impl MessageData for RAW_RPM_DATA {
27618 type Message = MavMessage;
27619 const ID: u32 = 339u32;
27620 const NAME: &'static str = "RAW_RPM";
27621 const EXTRA_CRC: u8 = 199u8;
27622 const ENCODED_LEN: usize = 5usize;
27623 fn deser(
27624 _version: MavlinkVersion,
27625 __input: &[u8],
27626 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27627 let avail_len = __input.len();
27628 let mut payload_buf = [0; Self::ENCODED_LEN];
27629 let mut buf = if avail_len < Self::ENCODED_LEN {
27630 payload_buf[0..avail_len].copy_from_slice(__input);
27631 Bytes::new(&payload_buf)
27632 } else {
27633 Bytes::new(__input)
27634 };
27635 let mut __struct = Self::default();
27636 __struct.frequency = buf.get_f32_le()?;
27637 __struct.index = buf.get_u8()?;
27638 Ok(__struct)
27639 }
27640 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27641 let mut __tmp = BytesMut::new(bytes);
27642 #[allow(clippy::absurd_extreme_comparisons)]
27643 #[allow(unused_comparisons)]
27644 if __tmp.remaining() < Self::ENCODED_LEN {
27645 panic!(
27646 "buffer is too small (need {} bytes, but got {})",
27647 Self::ENCODED_LEN,
27648 __tmp.remaining(),
27649 )
27650 }
27651 __tmp.put_f32_le(self.frequency);
27652 __tmp.put_u8(self.index);
27653 if matches!(version, MavlinkVersion::V2) {
27654 let len = __tmp.len();
27655 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27656 } else {
27657 __tmp.len()
27658 }
27659 }
27660}
27661#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
27662#[doc = ""]
27663#[doc = "ID: 65"]
27664#[derive(Debug, Clone, PartialEq)]
27665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27667#[cfg_attr(feature = "ts", derive(TS))]
27668#[cfg_attr(feature = "ts", ts(export))]
27669pub struct RC_CHANNELS_DATA {
27670 #[doc = "Timestamp (time since system boot)."]
27671 pub time_boot_ms: u32,
27672 #[doc = "RC channel 1 value."]
27673 pub chan1_raw: u16,
27674 #[doc = "RC channel 2 value."]
27675 pub chan2_raw: u16,
27676 #[doc = "RC channel 3 value."]
27677 pub chan3_raw: u16,
27678 #[doc = "RC channel 4 value."]
27679 pub chan4_raw: u16,
27680 #[doc = "RC channel 5 value."]
27681 pub chan5_raw: u16,
27682 #[doc = "RC channel 6 value."]
27683 pub chan6_raw: u16,
27684 #[doc = "RC channel 7 value."]
27685 pub chan7_raw: u16,
27686 #[doc = "RC channel 8 value."]
27687 pub chan8_raw: u16,
27688 #[doc = "RC channel 9 value."]
27689 pub chan9_raw: u16,
27690 #[doc = "RC channel 10 value."]
27691 pub chan10_raw: u16,
27692 #[doc = "RC channel 11 value."]
27693 pub chan11_raw: u16,
27694 #[doc = "RC channel 12 value."]
27695 pub chan12_raw: u16,
27696 #[doc = "RC channel 13 value."]
27697 pub chan13_raw: u16,
27698 #[doc = "RC channel 14 value."]
27699 pub chan14_raw: u16,
27700 #[doc = "RC channel 15 value."]
27701 pub chan15_raw: u16,
27702 #[doc = "RC channel 16 value."]
27703 pub chan16_raw: u16,
27704 #[doc = "RC channel 17 value."]
27705 pub chan17_raw: u16,
27706 #[doc = "RC channel 18 value."]
27707 pub chan18_raw: u16,
27708 #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
27709 pub chancount: u8,
27710 #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27711 pub rssi: u8,
27712}
27713impl RC_CHANNELS_DATA {
27714 pub const ENCODED_LEN: usize = 42usize;
27715 pub const DEFAULT: Self = Self {
27716 time_boot_ms: 0_u32,
27717 chan1_raw: 0_u16,
27718 chan2_raw: 0_u16,
27719 chan3_raw: 0_u16,
27720 chan4_raw: 0_u16,
27721 chan5_raw: 0_u16,
27722 chan6_raw: 0_u16,
27723 chan7_raw: 0_u16,
27724 chan8_raw: 0_u16,
27725 chan9_raw: 0_u16,
27726 chan10_raw: 0_u16,
27727 chan11_raw: 0_u16,
27728 chan12_raw: 0_u16,
27729 chan13_raw: 0_u16,
27730 chan14_raw: 0_u16,
27731 chan15_raw: 0_u16,
27732 chan16_raw: 0_u16,
27733 chan17_raw: 0_u16,
27734 chan18_raw: 0_u16,
27735 chancount: 0_u8,
27736 rssi: 0_u8,
27737 };
27738 #[cfg(feature = "arbitrary")]
27739 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27740 use arbitrary::{Arbitrary, Unstructured};
27741 let mut buf = [0u8; 1024];
27742 rng.fill_bytes(&mut buf);
27743 let mut unstructured = Unstructured::new(&buf);
27744 Self::arbitrary(&mut unstructured).unwrap_or_default()
27745 }
27746}
27747impl Default for RC_CHANNELS_DATA {
27748 fn default() -> Self {
27749 Self::DEFAULT.clone()
27750 }
27751}
27752impl MessageData for RC_CHANNELS_DATA {
27753 type Message = MavMessage;
27754 const ID: u32 = 65u32;
27755 const NAME: &'static str = "RC_CHANNELS";
27756 const EXTRA_CRC: u8 = 118u8;
27757 const ENCODED_LEN: usize = 42usize;
27758 fn deser(
27759 _version: MavlinkVersion,
27760 __input: &[u8],
27761 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27762 let avail_len = __input.len();
27763 let mut payload_buf = [0; Self::ENCODED_LEN];
27764 let mut buf = if avail_len < Self::ENCODED_LEN {
27765 payload_buf[0..avail_len].copy_from_slice(__input);
27766 Bytes::new(&payload_buf)
27767 } else {
27768 Bytes::new(__input)
27769 };
27770 let mut __struct = Self::default();
27771 __struct.time_boot_ms = buf.get_u32_le()?;
27772 __struct.chan1_raw = buf.get_u16_le()?;
27773 __struct.chan2_raw = buf.get_u16_le()?;
27774 __struct.chan3_raw = buf.get_u16_le()?;
27775 __struct.chan4_raw = buf.get_u16_le()?;
27776 __struct.chan5_raw = buf.get_u16_le()?;
27777 __struct.chan6_raw = buf.get_u16_le()?;
27778 __struct.chan7_raw = buf.get_u16_le()?;
27779 __struct.chan8_raw = buf.get_u16_le()?;
27780 __struct.chan9_raw = buf.get_u16_le()?;
27781 __struct.chan10_raw = buf.get_u16_le()?;
27782 __struct.chan11_raw = buf.get_u16_le()?;
27783 __struct.chan12_raw = buf.get_u16_le()?;
27784 __struct.chan13_raw = buf.get_u16_le()?;
27785 __struct.chan14_raw = buf.get_u16_le()?;
27786 __struct.chan15_raw = buf.get_u16_le()?;
27787 __struct.chan16_raw = buf.get_u16_le()?;
27788 __struct.chan17_raw = buf.get_u16_le()?;
27789 __struct.chan18_raw = buf.get_u16_le()?;
27790 __struct.chancount = buf.get_u8()?;
27791 __struct.rssi = buf.get_u8()?;
27792 Ok(__struct)
27793 }
27794 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27795 let mut __tmp = BytesMut::new(bytes);
27796 #[allow(clippy::absurd_extreme_comparisons)]
27797 #[allow(unused_comparisons)]
27798 if __tmp.remaining() < Self::ENCODED_LEN {
27799 panic!(
27800 "buffer is too small (need {} bytes, but got {})",
27801 Self::ENCODED_LEN,
27802 __tmp.remaining(),
27803 )
27804 }
27805 __tmp.put_u32_le(self.time_boot_ms);
27806 __tmp.put_u16_le(self.chan1_raw);
27807 __tmp.put_u16_le(self.chan2_raw);
27808 __tmp.put_u16_le(self.chan3_raw);
27809 __tmp.put_u16_le(self.chan4_raw);
27810 __tmp.put_u16_le(self.chan5_raw);
27811 __tmp.put_u16_le(self.chan6_raw);
27812 __tmp.put_u16_le(self.chan7_raw);
27813 __tmp.put_u16_le(self.chan8_raw);
27814 __tmp.put_u16_le(self.chan9_raw);
27815 __tmp.put_u16_le(self.chan10_raw);
27816 __tmp.put_u16_le(self.chan11_raw);
27817 __tmp.put_u16_le(self.chan12_raw);
27818 __tmp.put_u16_le(self.chan13_raw);
27819 __tmp.put_u16_le(self.chan14_raw);
27820 __tmp.put_u16_le(self.chan15_raw);
27821 __tmp.put_u16_le(self.chan16_raw);
27822 __tmp.put_u16_le(self.chan17_raw);
27823 __tmp.put_u16_le(self.chan18_raw);
27824 __tmp.put_u8(self.chancount);
27825 __tmp.put_u8(self.rssi);
27826 if matches!(version, MavlinkVersion::V2) {
27827 let len = __tmp.len();
27828 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27829 } else {
27830 __tmp.len()
27831 }
27832 }
27833}
27834#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
27835#[doc = ""]
27836#[doc = "ID: 70"]
27837#[derive(Debug, Clone, PartialEq)]
27838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27840#[cfg_attr(feature = "ts", derive(TS))]
27841#[cfg_attr(feature = "ts", ts(export))]
27842pub struct RC_CHANNELS_OVERRIDE_DATA {
27843 #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27844 pub chan1_raw: u16,
27845 #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27846 pub chan2_raw: u16,
27847 #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27848 pub chan3_raw: u16,
27849 #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27850 pub chan4_raw: u16,
27851 #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27852 pub chan5_raw: u16,
27853 #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27854 pub chan6_raw: u16,
27855 #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27856 pub chan7_raw: u16,
27857 #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
27858 pub chan8_raw: u16,
27859 #[doc = "System ID"]
27860 pub target_system: u8,
27861 #[doc = "Component ID"]
27862 pub target_component: u8,
27863 #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27864 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27865 pub chan9_raw: u16,
27866 #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27867 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27868 pub chan10_raw: u16,
27869 #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27870 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27871 pub chan11_raw: u16,
27872 #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27873 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27874 pub chan12_raw: u16,
27875 #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27876 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27877 pub chan13_raw: u16,
27878 #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27879 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27880 pub chan14_raw: u16,
27881 #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27882 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27883 pub chan15_raw: u16,
27884 #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27885 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27886 pub chan16_raw: u16,
27887 #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27888 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27889 pub chan17_raw: u16,
27890 #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
27891 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27892 pub chan18_raw: u16,
27893}
27894impl RC_CHANNELS_OVERRIDE_DATA {
27895 pub const ENCODED_LEN: usize = 38usize;
27896 pub const DEFAULT: Self = Self {
27897 chan1_raw: 0_u16,
27898 chan2_raw: 0_u16,
27899 chan3_raw: 0_u16,
27900 chan4_raw: 0_u16,
27901 chan5_raw: 0_u16,
27902 chan6_raw: 0_u16,
27903 chan7_raw: 0_u16,
27904 chan8_raw: 0_u16,
27905 target_system: 0_u8,
27906 target_component: 0_u8,
27907 chan9_raw: 0_u16,
27908 chan10_raw: 0_u16,
27909 chan11_raw: 0_u16,
27910 chan12_raw: 0_u16,
27911 chan13_raw: 0_u16,
27912 chan14_raw: 0_u16,
27913 chan15_raw: 0_u16,
27914 chan16_raw: 0_u16,
27915 chan17_raw: 0_u16,
27916 chan18_raw: 0_u16,
27917 };
27918 #[cfg(feature = "arbitrary")]
27919 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27920 use arbitrary::{Arbitrary, Unstructured};
27921 let mut buf = [0u8; 1024];
27922 rng.fill_bytes(&mut buf);
27923 let mut unstructured = Unstructured::new(&buf);
27924 Self::arbitrary(&mut unstructured).unwrap_or_default()
27925 }
27926}
27927impl Default for RC_CHANNELS_OVERRIDE_DATA {
27928 fn default() -> Self {
27929 Self::DEFAULT.clone()
27930 }
27931}
27932impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
27933 type Message = MavMessage;
27934 const ID: u32 = 70u32;
27935 const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
27936 const EXTRA_CRC: u8 = 124u8;
27937 const ENCODED_LEN: usize = 38usize;
27938 fn deser(
27939 _version: MavlinkVersion,
27940 __input: &[u8],
27941 ) -> Result<Self, ::mavlink_core::error::ParserError> {
27942 let avail_len = __input.len();
27943 let mut payload_buf = [0; Self::ENCODED_LEN];
27944 let mut buf = if avail_len < Self::ENCODED_LEN {
27945 payload_buf[0..avail_len].copy_from_slice(__input);
27946 Bytes::new(&payload_buf)
27947 } else {
27948 Bytes::new(__input)
27949 };
27950 let mut __struct = Self::default();
27951 __struct.chan1_raw = buf.get_u16_le()?;
27952 __struct.chan2_raw = buf.get_u16_le()?;
27953 __struct.chan3_raw = buf.get_u16_le()?;
27954 __struct.chan4_raw = buf.get_u16_le()?;
27955 __struct.chan5_raw = buf.get_u16_le()?;
27956 __struct.chan6_raw = buf.get_u16_le()?;
27957 __struct.chan7_raw = buf.get_u16_le()?;
27958 __struct.chan8_raw = buf.get_u16_le()?;
27959 __struct.target_system = buf.get_u8()?;
27960 __struct.target_component = buf.get_u8()?;
27961 __struct.chan9_raw = buf.get_u16_le()?;
27962 __struct.chan10_raw = buf.get_u16_le()?;
27963 __struct.chan11_raw = buf.get_u16_le()?;
27964 __struct.chan12_raw = buf.get_u16_le()?;
27965 __struct.chan13_raw = buf.get_u16_le()?;
27966 __struct.chan14_raw = buf.get_u16_le()?;
27967 __struct.chan15_raw = buf.get_u16_le()?;
27968 __struct.chan16_raw = buf.get_u16_le()?;
27969 __struct.chan17_raw = buf.get_u16_le()?;
27970 __struct.chan18_raw = buf.get_u16_le()?;
27971 Ok(__struct)
27972 }
27973 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27974 let mut __tmp = BytesMut::new(bytes);
27975 #[allow(clippy::absurd_extreme_comparisons)]
27976 #[allow(unused_comparisons)]
27977 if __tmp.remaining() < Self::ENCODED_LEN {
27978 panic!(
27979 "buffer is too small (need {} bytes, but got {})",
27980 Self::ENCODED_LEN,
27981 __tmp.remaining(),
27982 )
27983 }
27984 __tmp.put_u16_le(self.chan1_raw);
27985 __tmp.put_u16_le(self.chan2_raw);
27986 __tmp.put_u16_le(self.chan3_raw);
27987 __tmp.put_u16_le(self.chan4_raw);
27988 __tmp.put_u16_le(self.chan5_raw);
27989 __tmp.put_u16_le(self.chan6_raw);
27990 __tmp.put_u16_le(self.chan7_raw);
27991 __tmp.put_u16_le(self.chan8_raw);
27992 __tmp.put_u8(self.target_system);
27993 __tmp.put_u8(self.target_component);
27994 if matches!(version, MavlinkVersion::V2) {
27995 __tmp.put_u16_le(self.chan9_raw);
27996 __tmp.put_u16_le(self.chan10_raw);
27997 __tmp.put_u16_le(self.chan11_raw);
27998 __tmp.put_u16_le(self.chan12_raw);
27999 __tmp.put_u16_le(self.chan13_raw);
28000 __tmp.put_u16_le(self.chan14_raw);
28001 __tmp.put_u16_le(self.chan15_raw);
28002 __tmp.put_u16_le(self.chan16_raw);
28003 __tmp.put_u16_le(self.chan17_raw);
28004 __tmp.put_u16_le(self.chan18_raw);
28005 let len = __tmp.len();
28006 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28007 } else {
28008 __tmp.len()
28009 }
28010 }
28011}
28012#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
28013#[doc = ""]
28014#[doc = "ID: 35"]
28015#[derive(Debug, Clone, PartialEq)]
28016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28018#[cfg_attr(feature = "ts", derive(TS))]
28019#[cfg_attr(feature = "ts", ts(export))]
28020pub struct RC_CHANNELS_RAW_DATA {
28021 #[doc = "Timestamp (time since system boot)."]
28022 pub time_boot_ms: u32,
28023 #[doc = "RC channel 1 value."]
28024 pub chan1_raw: u16,
28025 #[doc = "RC channel 2 value."]
28026 pub chan2_raw: u16,
28027 #[doc = "RC channel 3 value."]
28028 pub chan3_raw: u16,
28029 #[doc = "RC channel 4 value."]
28030 pub chan4_raw: u16,
28031 #[doc = "RC channel 5 value."]
28032 pub chan5_raw: u16,
28033 #[doc = "RC channel 6 value."]
28034 pub chan6_raw: u16,
28035 #[doc = "RC channel 7 value."]
28036 pub chan7_raw: u16,
28037 #[doc = "RC channel 8 value."]
28038 pub chan8_raw: u16,
28039 #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28040 pub port: u8,
28041 #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
28042 pub rssi: u8,
28043}
28044impl RC_CHANNELS_RAW_DATA {
28045 pub const ENCODED_LEN: usize = 22usize;
28046 pub const DEFAULT: Self = Self {
28047 time_boot_ms: 0_u32,
28048 chan1_raw: 0_u16,
28049 chan2_raw: 0_u16,
28050 chan3_raw: 0_u16,
28051 chan4_raw: 0_u16,
28052 chan5_raw: 0_u16,
28053 chan6_raw: 0_u16,
28054 chan7_raw: 0_u16,
28055 chan8_raw: 0_u16,
28056 port: 0_u8,
28057 rssi: 0_u8,
28058 };
28059 #[cfg(feature = "arbitrary")]
28060 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28061 use arbitrary::{Arbitrary, Unstructured};
28062 let mut buf = [0u8; 1024];
28063 rng.fill_bytes(&mut buf);
28064 let mut unstructured = Unstructured::new(&buf);
28065 Self::arbitrary(&mut unstructured).unwrap_or_default()
28066 }
28067}
28068impl Default for RC_CHANNELS_RAW_DATA {
28069 fn default() -> Self {
28070 Self::DEFAULT.clone()
28071 }
28072}
28073impl MessageData for RC_CHANNELS_RAW_DATA {
28074 type Message = MavMessage;
28075 const ID: u32 = 35u32;
28076 const NAME: &'static str = "RC_CHANNELS_RAW";
28077 const EXTRA_CRC: u8 = 244u8;
28078 const ENCODED_LEN: usize = 22usize;
28079 fn deser(
28080 _version: MavlinkVersion,
28081 __input: &[u8],
28082 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28083 let avail_len = __input.len();
28084 let mut payload_buf = [0; Self::ENCODED_LEN];
28085 let mut buf = if avail_len < Self::ENCODED_LEN {
28086 payload_buf[0..avail_len].copy_from_slice(__input);
28087 Bytes::new(&payload_buf)
28088 } else {
28089 Bytes::new(__input)
28090 };
28091 let mut __struct = Self::default();
28092 __struct.time_boot_ms = buf.get_u32_le()?;
28093 __struct.chan1_raw = buf.get_u16_le()?;
28094 __struct.chan2_raw = buf.get_u16_le()?;
28095 __struct.chan3_raw = buf.get_u16_le()?;
28096 __struct.chan4_raw = buf.get_u16_le()?;
28097 __struct.chan5_raw = buf.get_u16_le()?;
28098 __struct.chan6_raw = buf.get_u16_le()?;
28099 __struct.chan7_raw = buf.get_u16_le()?;
28100 __struct.chan8_raw = buf.get_u16_le()?;
28101 __struct.port = buf.get_u8()?;
28102 __struct.rssi = buf.get_u8()?;
28103 Ok(__struct)
28104 }
28105 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28106 let mut __tmp = BytesMut::new(bytes);
28107 #[allow(clippy::absurd_extreme_comparisons)]
28108 #[allow(unused_comparisons)]
28109 if __tmp.remaining() < Self::ENCODED_LEN {
28110 panic!(
28111 "buffer is too small (need {} bytes, but got {})",
28112 Self::ENCODED_LEN,
28113 __tmp.remaining(),
28114 )
28115 }
28116 __tmp.put_u32_le(self.time_boot_ms);
28117 __tmp.put_u16_le(self.chan1_raw);
28118 __tmp.put_u16_le(self.chan2_raw);
28119 __tmp.put_u16_le(self.chan3_raw);
28120 __tmp.put_u16_le(self.chan4_raw);
28121 __tmp.put_u16_le(self.chan5_raw);
28122 __tmp.put_u16_le(self.chan6_raw);
28123 __tmp.put_u16_le(self.chan7_raw);
28124 __tmp.put_u16_le(self.chan8_raw);
28125 __tmp.put_u8(self.port);
28126 __tmp.put_u8(self.rssi);
28127 if matches!(version, MavlinkVersion::V2) {
28128 let len = __tmp.len();
28129 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28130 } else {
28131 __tmp.len()
28132 }
28133 }
28134}
28135#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
28136#[doc = ""]
28137#[doc = "ID: 34"]
28138#[derive(Debug, Clone, PartialEq)]
28139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28141#[cfg_attr(feature = "ts", derive(TS))]
28142#[cfg_attr(feature = "ts", ts(export))]
28143pub struct RC_CHANNELS_SCALED_DATA {
28144 #[doc = "Timestamp (time since system boot)."]
28145 pub time_boot_ms: u32,
28146 #[doc = "RC channel 1 value scaled."]
28147 pub chan1_scaled: i16,
28148 #[doc = "RC channel 2 value scaled."]
28149 pub chan2_scaled: i16,
28150 #[doc = "RC channel 3 value scaled."]
28151 pub chan3_scaled: i16,
28152 #[doc = "RC channel 4 value scaled."]
28153 pub chan4_scaled: i16,
28154 #[doc = "RC channel 5 value scaled."]
28155 pub chan5_scaled: i16,
28156 #[doc = "RC channel 6 value scaled."]
28157 pub chan6_scaled: i16,
28158 #[doc = "RC channel 7 value scaled."]
28159 pub chan7_scaled: i16,
28160 #[doc = "RC channel 8 value scaled."]
28161 pub chan8_scaled: i16,
28162 #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28163 pub port: u8,
28164 #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
28165 pub rssi: u8,
28166}
28167impl RC_CHANNELS_SCALED_DATA {
28168 pub const ENCODED_LEN: usize = 22usize;
28169 pub const DEFAULT: Self = Self {
28170 time_boot_ms: 0_u32,
28171 chan1_scaled: 0_i16,
28172 chan2_scaled: 0_i16,
28173 chan3_scaled: 0_i16,
28174 chan4_scaled: 0_i16,
28175 chan5_scaled: 0_i16,
28176 chan6_scaled: 0_i16,
28177 chan7_scaled: 0_i16,
28178 chan8_scaled: 0_i16,
28179 port: 0_u8,
28180 rssi: 0_u8,
28181 };
28182 #[cfg(feature = "arbitrary")]
28183 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28184 use arbitrary::{Arbitrary, Unstructured};
28185 let mut buf = [0u8; 1024];
28186 rng.fill_bytes(&mut buf);
28187 let mut unstructured = Unstructured::new(&buf);
28188 Self::arbitrary(&mut unstructured).unwrap_or_default()
28189 }
28190}
28191impl Default for RC_CHANNELS_SCALED_DATA {
28192 fn default() -> Self {
28193 Self::DEFAULT.clone()
28194 }
28195}
28196impl MessageData for RC_CHANNELS_SCALED_DATA {
28197 type Message = MavMessage;
28198 const ID: u32 = 34u32;
28199 const NAME: &'static str = "RC_CHANNELS_SCALED";
28200 const EXTRA_CRC: u8 = 237u8;
28201 const ENCODED_LEN: usize = 22usize;
28202 fn deser(
28203 _version: MavlinkVersion,
28204 __input: &[u8],
28205 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28206 let avail_len = __input.len();
28207 let mut payload_buf = [0; Self::ENCODED_LEN];
28208 let mut buf = if avail_len < Self::ENCODED_LEN {
28209 payload_buf[0..avail_len].copy_from_slice(__input);
28210 Bytes::new(&payload_buf)
28211 } else {
28212 Bytes::new(__input)
28213 };
28214 let mut __struct = Self::default();
28215 __struct.time_boot_ms = buf.get_u32_le()?;
28216 __struct.chan1_scaled = buf.get_i16_le()?;
28217 __struct.chan2_scaled = buf.get_i16_le()?;
28218 __struct.chan3_scaled = buf.get_i16_le()?;
28219 __struct.chan4_scaled = buf.get_i16_le()?;
28220 __struct.chan5_scaled = buf.get_i16_le()?;
28221 __struct.chan6_scaled = buf.get_i16_le()?;
28222 __struct.chan7_scaled = buf.get_i16_le()?;
28223 __struct.chan8_scaled = buf.get_i16_le()?;
28224 __struct.port = buf.get_u8()?;
28225 __struct.rssi = buf.get_u8()?;
28226 Ok(__struct)
28227 }
28228 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28229 let mut __tmp = BytesMut::new(bytes);
28230 #[allow(clippy::absurd_extreme_comparisons)]
28231 #[allow(unused_comparisons)]
28232 if __tmp.remaining() < Self::ENCODED_LEN {
28233 panic!(
28234 "buffer is too small (need {} bytes, but got {})",
28235 Self::ENCODED_LEN,
28236 __tmp.remaining(),
28237 )
28238 }
28239 __tmp.put_u32_le(self.time_boot_ms);
28240 __tmp.put_i16_le(self.chan1_scaled);
28241 __tmp.put_i16_le(self.chan2_scaled);
28242 __tmp.put_i16_le(self.chan3_scaled);
28243 __tmp.put_i16_le(self.chan4_scaled);
28244 __tmp.put_i16_le(self.chan5_scaled);
28245 __tmp.put_i16_le(self.chan6_scaled);
28246 __tmp.put_i16_le(self.chan7_scaled);
28247 __tmp.put_i16_le(self.chan8_scaled);
28248 __tmp.put_u8(self.port);
28249 __tmp.put_u8(self.rssi);
28250 if matches!(version, MavlinkVersion::V2) {
28251 let len = __tmp.len();
28252 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28253 } else {
28254 __tmp.len()
28255 }
28256 }
28257}
28258#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Superseded since 2015-08)"]
28259#[doc = "Request a data stream."]
28260#[doc = ""]
28261#[doc = "ID: 66"]
28262#[derive(Debug, Clone, PartialEq)]
28263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28265#[cfg_attr(feature = "ts", derive(TS))]
28266#[cfg_attr(feature = "ts", ts(export))]
28267pub struct REQUEST_DATA_STREAM_DATA {
28268 #[doc = "The requested message rate"]
28269 pub req_message_rate: u16,
28270 #[doc = "The target requested to send the message stream."]
28271 pub target_system: u8,
28272 #[doc = "The target requested to send the message stream."]
28273 pub target_component: u8,
28274 #[doc = "The ID of the requested data stream"]
28275 pub req_stream_id: u8,
28276 #[doc = "1 to start sending, 0 to stop sending."]
28277 pub start_stop: u8,
28278}
28279impl REQUEST_DATA_STREAM_DATA {
28280 pub const ENCODED_LEN: usize = 6usize;
28281 pub const DEFAULT: Self = Self {
28282 req_message_rate: 0_u16,
28283 target_system: 0_u8,
28284 target_component: 0_u8,
28285 req_stream_id: 0_u8,
28286 start_stop: 0_u8,
28287 };
28288 #[cfg(feature = "arbitrary")]
28289 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28290 use arbitrary::{Arbitrary, Unstructured};
28291 let mut buf = [0u8; 1024];
28292 rng.fill_bytes(&mut buf);
28293 let mut unstructured = Unstructured::new(&buf);
28294 Self::arbitrary(&mut unstructured).unwrap_or_default()
28295 }
28296}
28297impl Default for REQUEST_DATA_STREAM_DATA {
28298 fn default() -> Self {
28299 Self::DEFAULT.clone()
28300 }
28301}
28302impl MessageData for REQUEST_DATA_STREAM_DATA {
28303 type Message = MavMessage;
28304 const ID: u32 = 66u32;
28305 const NAME: &'static str = "REQUEST_DATA_STREAM";
28306 const EXTRA_CRC: u8 = 148u8;
28307 const ENCODED_LEN: usize = 6usize;
28308 fn deser(
28309 _version: MavlinkVersion,
28310 __input: &[u8],
28311 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28312 let avail_len = __input.len();
28313 let mut payload_buf = [0; Self::ENCODED_LEN];
28314 let mut buf = if avail_len < Self::ENCODED_LEN {
28315 payload_buf[0..avail_len].copy_from_slice(__input);
28316 Bytes::new(&payload_buf)
28317 } else {
28318 Bytes::new(__input)
28319 };
28320 let mut __struct = Self::default();
28321 __struct.req_message_rate = buf.get_u16_le()?;
28322 __struct.target_system = buf.get_u8()?;
28323 __struct.target_component = buf.get_u8()?;
28324 __struct.req_stream_id = buf.get_u8()?;
28325 __struct.start_stop = buf.get_u8()?;
28326 Ok(__struct)
28327 }
28328 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28329 let mut __tmp = BytesMut::new(bytes);
28330 #[allow(clippy::absurd_extreme_comparisons)]
28331 #[allow(unused_comparisons)]
28332 if __tmp.remaining() < Self::ENCODED_LEN {
28333 panic!(
28334 "buffer is too small (need {} bytes, but got {})",
28335 Self::ENCODED_LEN,
28336 __tmp.remaining(),
28337 )
28338 }
28339 __tmp.put_u16_le(self.req_message_rate);
28340 __tmp.put_u8(self.target_system);
28341 __tmp.put_u8(self.target_component);
28342 __tmp.put_u8(self.req_stream_id);
28343 __tmp.put_u8(self.start_stop);
28344 if matches!(version, MavlinkVersion::V2) {
28345 let len = __tmp.len();
28346 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28347 } else {
28348 __tmp.len()
28349 }
28350 }
28351}
28352#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
28353#[doc = ""]
28354#[doc = "ID: 412"]
28355#[derive(Debug, Clone, PartialEq)]
28356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28358#[cfg_attr(feature = "ts", derive(TS))]
28359#[cfg_attr(feature = "ts", ts(export))]
28360pub struct REQUEST_EVENT_DATA {
28361 #[doc = "First sequence number of the requested event."]
28362 pub first_sequence: u16,
28363 #[doc = "Last sequence number of the requested event."]
28364 pub last_sequence: u16,
28365 #[doc = "System ID"]
28366 pub target_system: u8,
28367 #[doc = "Component ID"]
28368 pub target_component: u8,
28369}
28370impl REQUEST_EVENT_DATA {
28371 pub const ENCODED_LEN: usize = 6usize;
28372 pub const DEFAULT: Self = Self {
28373 first_sequence: 0_u16,
28374 last_sequence: 0_u16,
28375 target_system: 0_u8,
28376 target_component: 0_u8,
28377 };
28378 #[cfg(feature = "arbitrary")]
28379 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28380 use arbitrary::{Arbitrary, Unstructured};
28381 let mut buf = [0u8; 1024];
28382 rng.fill_bytes(&mut buf);
28383 let mut unstructured = Unstructured::new(&buf);
28384 Self::arbitrary(&mut unstructured).unwrap_or_default()
28385 }
28386}
28387impl Default for REQUEST_EVENT_DATA {
28388 fn default() -> Self {
28389 Self::DEFAULT.clone()
28390 }
28391}
28392impl MessageData for REQUEST_EVENT_DATA {
28393 type Message = MavMessage;
28394 const ID: u32 = 412u32;
28395 const NAME: &'static str = "REQUEST_EVENT";
28396 const EXTRA_CRC: u8 = 33u8;
28397 const ENCODED_LEN: usize = 6usize;
28398 fn deser(
28399 _version: MavlinkVersion,
28400 __input: &[u8],
28401 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28402 let avail_len = __input.len();
28403 let mut payload_buf = [0; Self::ENCODED_LEN];
28404 let mut buf = if avail_len < Self::ENCODED_LEN {
28405 payload_buf[0..avail_len].copy_from_slice(__input);
28406 Bytes::new(&payload_buf)
28407 } else {
28408 Bytes::new(__input)
28409 };
28410 let mut __struct = Self::default();
28411 __struct.first_sequence = buf.get_u16_le()?;
28412 __struct.last_sequence = buf.get_u16_le()?;
28413 __struct.target_system = buf.get_u8()?;
28414 __struct.target_component = buf.get_u8()?;
28415 Ok(__struct)
28416 }
28417 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28418 let mut __tmp = BytesMut::new(bytes);
28419 #[allow(clippy::absurd_extreme_comparisons)]
28420 #[allow(unused_comparisons)]
28421 if __tmp.remaining() < Self::ENCODED_LEN {
28422 panic!(
28423 "buffer is too small (need {} bytes, but got {})",
28424 Self::ENCODED_LEN,
28425 __tmp.remaining(),
28426 )
28427 }
28428 __tmp.put_u16_le(self.first_sequence);
28429 __tmp.put_u16_le(self.last_sequence);
28430 __tmp.put_u8(self.target_system);
28431 __tmp.put_u8(self.target_component);
28432 if matches!(version, MavlinkVersion::V2) {
28433 let len = __tmp.len();
28434 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28435 } else {
28436 __tmp.len()
28437 }
28438 }
28439}
28440#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
28441#[doc = ""]
28442#[doc = "ID: 142"]
28443#[derive(Debug, Clone, PartialEq)]
28444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28446#[cfg_attr(feature = "ts", derive(TS))]
28447#[cfg_attr(feature = "ts", ts(export))]
28448pub struct RESOURCE_REQUEST_DATA {
28449 #[doc = "Request ID. This ID should be reused when sending back URI contents"]
28450 pub request_id: u8,
28451 #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
28452 pub uri_type: u8,
28453 #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
28454 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28455 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28456 pub uri: [u8; 120],
28457 #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
28458 pub transfer_type: u8,
28459 #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
28460 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28461 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28462 pub storage: [u8; 120],
28463}
28464impl RESOURCE_REQUEST_DATA {
28465 pub const ENCODED_LEN: usize = 243usize;
28466 pub const DEFAULT: Self = Self {
28467 request_id: 0_u8,
28468 uri_type: 0_u8,
28469 uri: [0_u8; 120usize],
28470 transfer_type: 0_u8,
28471 storage: [0_u8; 120usize],
28472 };
28473 #[cfg(feature = "arbitrary")]
28474 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28475 use arbitrary::{Arbitrary, Unstructured};
28476 let mut buf = [0u8; 1024];
28477 rng.fill_bytes(&mut buf);
28478 let mut unstructured = Unstructured::new(&buf);
28479 Self::arbitrary(&mut unstructured).unwrap_or_default()
28480 }
28481}
28482impl Default for RESOURCE_REQUEST_DATA {
28483 fn default() -> Self {
28484 Self::DEFAULT.clone()
28485 }
28486}
28487impl MessageData for RESOURCE_REQUEST_DATA {
28488 type Message = MavMessage;
28489 const ID: u32 = 142u32;
28490 const NAME: &'static str = "RESOURCE_REQUEST";
28491 const EXTRA_CRC: u8 = 72u8;
28492 const ENCODED_LEN: usize = 243usize;
28493 fn deser(
28494 _version: MavlinkVersion,
28495 __input: &[u8],
28496 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28497 let avail_len = __input.len();
28498 let mut payload_buf = [0; Self::ENCODED_LEN];
28499 let mut buf = if avail_len < Self::ENCODED_LEN {
28500 payload_buf[0..avail_len].copy_from_slice(__input);
28501 Bytes::new(&payload_buf)
28502 } else {
28503 Bytes::new(__input)
28504 };
28505 let mut __struct = Self::default();
28506 __struct.request_id = buf.get_u8()?;
28507 __struct.uri_type = buf.get_u8()?;
28508 for v in &mut __struct.uri {
28509 let val = buf.get_u8()?;
28510 *v = val;
28511 }
28512 __struct.transfer_type = buf.get_u8()?;
28513 for v in &mut __struct.storage {
28514 let val = buf.get_u8()?;
28515 *v = val;
28516 }
28517 Ok(__struct)
28518 }
28519 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28520 let mut __tmp = BytesMut::new(bytes);
28521 #[allow(clippy::absurd_extreme_comparisons)]
28522 #[allow(unused_comparisons)]
28523 if __tmp.remaining() < Self::ENCODED_LEN {
28524 panic!(
28525 "buffer is too small (need {} bytes, but got {})",
28526 Self::ENCODED_LEN,
28527 __tmp.remaining(),
28528 )
28529 }
28530 __tmp.put_u8(self.request_id);
28531 __tmp.put_u8(self.uri_type);
28532 for val in &self.uri {
28533 __tmp.put_u8(*val);
28534 }
28535 __tmp.put_u8(self.transfer_type);
28536 for val in &self.storage {
28537 __tmp.put_u8(*val);
28538 }
28539 if matches!(version, MavlinkVersion::V2) {
28540 let len = __tmp.len();
28541 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28542 } else {
28543 __tmp.len()
28544 }
28545 }
28546}
28547#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
28548#[doc = ""]
28549#[doc = "ID: 413"]
28550#[derive(Debug, Clone, PartialEq)]
28551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28553#[cfg_attr(feature = "ts", derive(TS))]
28554#[cfg_attr(feature = "ts", ts(export))]
28555pub struct RESPONSE_EVENT_ERROR_DATA {
28556 #[doc = "Sequence number."]
28557 pub sequence: u16,
28558 #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
28559 pub sequence_oldest_available: u16,
28560 #[doc = "System ID"]
28561 pub target_system: u8,
28562 #[doc = "Component ID"]
28563 pub target_component: u8,
28564 #[doc = "Error reason."]
28565 pub reason: MavEventErrorReason,
28566}
28567impl RESPONSE_EVENT_ERROR_DATA {
28568 pub const ENCODED_LEN: usize = 7usize;
28569 pub const DEFAULT: Self = Self {
28570 sequence: 0_u16,
28571 sequence_oldest_available: 0_u16,
28572 target_system: 0_u8,
28573 target_component: 0_u8,
28574 reason: MavEventErrorReason::DEFAULT,
28575 };
28576 #[cfg(feature = "arbitrary")]
28577 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28578 use arbitrary::{Arbitrary, Unstructured};
28579 let mut buf = [0u8; 1024];
28580 rng.fill_bytes(&mut buf);
28581 let mut unstructured = Unstructured::new(&buf);
28582 Self::arbitrary(&mut unstructured).unwrap_or_default()
28583 }
28584}
28585impl Default for RESPONSE_EVENT_ERROR_DATA {
28586 fn default() -> Self {
28587 Self::DEFAULT.clone()
28588 }
28589}
28590impl MessageData for RESPONSE_EVENT_ERROR_DATA {
28591 type Message = MavMessage;
28592 const ID: u32 = 413u32;
28593 const NAME: &'static str = "RESPONSE_EVENT_ERROR";
28594 const EXTRA_CRC: u8 = 77u8;
28595 const ENCODED_LEN: usize = 7usize;
28596 fn deser(
28597 _version: MavlinkVersion,
28598 __input: &[u8],
28599 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28600 let avail_len = __input.len();
28601 let mut payload_buf = [0; Self::ENCODED_LEN];
28602 let mut buf = if avail_len < Self::ENCODED_LEN {
28603 payload_buf[0..avail_len].copy_from_slice(__input);
28604 Bytes::new(&payload_buf)
28605 } else {
28606 Bytes::new(__input)
28607 };
28608 let mut __struct = Self::default();
28609 __struct.sequence = buf.get_u16_le()?;
28610 __struct.sequence_oldest_available = buf.get_u16_le()?;
28611 __struct.target_system = buf.get_u8()?;
28612 __struct.target_component = buf.get_u8()?;
28613 let tmp = buf.get_u8()?;
28614 __struct.reason =
28615 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28616 enum_type: "MavEventErrorReason",
28617 value: tmp as u64,
28618 })?;
28619 Ok(__struct)
28620 }
28621 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28622 let mut __tmp = BytesMut::new(bytes);
28623 #[allow(clippy::absurd_extreme_comparisons)]
28624 #[allow(unused_comparisons)]
28625 if __tmp.remaining() < Self::ENCODED_LEN {
28626 panic!(
28627 "buffer is too small (need {} bytes, but got {})",
28628 Self::ENCODED_LEN,
28629 __tmp.remaining(),
28630 )
28631 }
28632 __tmp.put_u16_le(self.sequence);
28633 __tmp.put_u16_le(self.sequence_oldest_available);
28634 __tmp.put_u8(self.target_system);
28635 __tmp.put_u8(self.target_component);
28636 __tmp.put_u8(self.reason as u8);
28637 if matches!(version, MavlinkVersion::V2) {
28638 let len = __tmp.len();
28639 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28640 } else {
28641 __tmp.len()
28642 }
28643 }
28644}
28645#[doc = "Read out the safety zone the MAV currently assumes."]
28646#[doc = ""]
28647#[doc = "ID: 55"]
28648#[derive(Debug, Clone, PartialEq)]
28649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28651#[cfg_attr(feature = "ts", derive(TS))]
28652#[cfg_attr(feature = "ts", ts(export))]
28653pub struct SAFETY_ALLOWED_AREA_DATA {
28654 #[doc = "x position 1 / Latitude 1"]
28655 pub p1x: f32,
28656 #[doc = "y position 1 / Longitude 1"]
28657 pub p1y: f32,
28658 #[doc = "z position 1 / Altitude 1"]
28659 pub p1z: f32,
28660 #[doc = "x position 2 / Latitude 2"]
28661 pub p2x: f32,
28662 #[doc = "y position 2 / Longitude 2"]
28663 pub p2y: f32,
28664 #[doc = "z position 2 / Altitude 2"]
28665 pub p2z: f32,
28666 #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
28667 pub frame: MavFrame,
28668}
28669impl SAFETY_ALLOWED_AREA_DATA {
28670 pub const ENCODED_LEN: usize = 25usize;
28671 pub const DEFAULT: Self = Self {
28672 p1x: 0.0_f32,
28673 p1y: 0.0_f32,
28674 p1z: 0.0_f32,
28675 p2x: 0.0_f32,
28676 p2y: 0.0_f32,
28677 p2z: 0.0_f32,
28678 frame: MavFrame::DEFAULT,
28679 };
28680 #[cfg(feature = "arbitrary")]
28681 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28682 use arbitrary::{Arbitrary, Unstructured};
28683 let mut buf = [0u8; 1024];
28684 rng.fill_bytes(&mut buf);
28685 let mut unstructured = Unstructured::new(&buf);
28686 Self::arbitrary(&mut unstructured).unwrap_or_default()
28687 }
28688}
28689impl Default for SAFETY_ALLOWED_AREA_DATA {
28690 fn default() -> Self {
28691 Self::DEFAULT.clone()
28692 }
28693}
28694impl MessageData for SAFETY_ALLOWED_AREA_DATA {
28695 type Message = MavMessage;
28696 const ID: u32 = 55u32;
28697 const NAME: &'static str = "SAFETY_ALLOWED_AREA";
28698 const EXTRA_CRC: u8 = 3u8;
28699 const ENCODED_LEN: usize = 25usize;
28700 fn deser(
28701 _version: MavlinkVersion,
28702 __input: &[u8],
28703 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28704 let avail_len = __input.len();
28705 let mut payload_buf = [0; Self::ENCODED_LEN];
28706 let mut buf = if avail_len < Self::ENCODED_LEN {
28707 payload_buf[0..avail_len].copy_from_slice(__input);
28708 Bytes::new(&payload_buf)
28709 } else {
28710 Bytes::new(__input)
28711 };
28712 let mut __struct = Self::default();
28713 __struct.p1x = buf.get_f32_le()?;
28714 __struct.p1y = buf.get_f32_le()?;
28715 __struct.p1z = buf.get_f32_le()?;
28716 __struct.p2x = buf.get_f32_le()?;
28717 __struct.p2y = buf.get_f32_le()?;
28718 __struct.p2z = buf.get_f32_le()?;
28719 let tmp = buf.get_u8()?;
28720 __struct.frame =
28721 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28722 enum_type: "MavFrame",
28723 value: tmp as u64,
28724 })?;
28725 Ok(__struct)
28726 }
28727 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28728 let mut __tmp = BytesMut::new(bytes);
28729 #[allow(clippy::absurd_extreme_comparisons)]
28730 #[allow(unused_comparisons)]
28731 if __tmp.remaining() < Self::ENCODED_LEN {
28732 panic!(
28733 "buffer is too small (need {} bytes, but got {})",
28734 Self::ENCODED_LEN,
28735 __tmp.remaining(),
28736 )
28737 }
28738 __tmp.put_f32_le(self.p1x);
28739 __tmp.put_f32_le(self.p1y);
28740 __tmp.put_f32_le(self.p1z);
28741 __tmp.put_f32_le(self.p2x);
28742 __tmp.put_f32_le(self.p2y);
28743 __tmp.put_f32_le(self.p2z);
28744 __tmp.put_u8(self.frame as u8);
28745 if matches!(version, MavlinkVersion::V2) {
28746 let len = __tmp.len();
28747 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28748 } else {
28749 __tmp.len()
28750 }
28751 }
28752}
28753#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
28754#[doc = ""]
28755#[doc = "ID: 54"]
28756#[derive(Debug, Clone, PartialEq)]
28757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28759#[cfg_attr(feature = "ts", derive(TS))]
28760#[cfg_attr(feature = "ts", ts(export))]
28761pub struct SAFETY_SET_ALLOWED_AREA_DATA {
28762 #[doc = "x position 1 / Latitude 1"]
28763 pub p1x: f32,
28764 #[doc = "y position 1 / Longitude 1"]
28765 pub p1y: f32,
28766 #[doc = "z position 1 / Altitude 1"]
28767 pub p1z: f32,
28768 #[doc = "x position 2 / Latitude 2"]
28769 pub p2x: f32,
28770 #[doc = "y position 2 / Longitude 2"]
28771 pub p2y: f32,
28772 #[doc = "z position 2 / Altitude 2"]
28773 pub p2z: f32,
28774 #[doc = "System ID"]
28775 pub target_system: u8,
28776 #[doc = "Component ID"]
28777 pub target_component: u8,
28778 #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
28779 pub frame: MavFrame,
28780}
28781impl SAFETY_SET_ALLOWED_AREA_DATA {
28782 pub const ENCODED_LEN: usize = 27usize;
28783 pub const DEFAULT: Self = Self {
28784 p1x: 0.0_f32,
28785 p1y: 0.0_f32,
28786 p1z: 0.0_f32,
28787 p2x: 0.0_f32,
28788 p2y: 0.0_f32,
28789 p2z: 0.0_f32,
28790 target_system: 0_u8,
28791 target_component: 0_u8,
28792 frame: MavFrame::DEFAULT,
28793 };
28794 #[cfg(feature = "arbitrary")]
28795 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28796 use arbitrary::{Arbitrary, Unstructured};
28797 let mut buf = [0u8; 1024];
28798 rng.fill_bytes(&mut buf);
28799 let mut unstructured = Unstructured::new(&buf);
28800 Self::arbitrary(&mut unstructured).unwrap_or_default()
28801 }
28802}
28803impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
28804 fn default() -> Self {
28805 Self::DEFAULT.clone()
28806 }
28807}
28808impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
28809 type Message = MavMessage;
28810 const ID: u32 = 54u32;
28811 const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
28812 const EXTRA_CRC: u8 = 15u8;
28813 const ENCODED_LEN: usize = 27usize;
28814 fn deser(
28815 _version: MavlinkVersion,
28816 __input: &[u8],
28817 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28818 let avail_len = __input.len();
28819 let mut payload_buf = [0; Self::ENCODED_LEN];
28820 let mut buf = if avail_len < Self::ENCODED_LEN {
28821 payload_buf[0..avail_len].copy_from_slice(__input);
28822 Bytes::new(&payload_buf)
28823 } else {
28824 Bytes::new(__input)
28825 };
28826 let mut __struct = Self::default();
28827 __struct.p1x = buf.get_f32_le()?;
28828 __struct.p1y = buf.get_f32_le()?;
28829 __struct.p1z = buf.get_f32_le()?;
28830 __struct.p2x = buf.get_f32_le()?;
28831 __struct.p2y = buf.get_f32_le()?;
28832 __struct.p2z = buf.get_f32_le()?;
28833 __struct.target_system = buf.get_u8()?;
28834 __struct.target_component = buf.get_u8()?;
28835 let tmp = buf.get_u8()?;
28836 __struct.frame =
28837 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28838 enum_type: "MavFrame",
28839 value: tmp as u64,
28840 })?;
28841 Ok(__struct)
28842 }
28843 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28844 let mut __tmp = BytesMut::new(bytes);
28845 #[allow(clippy::absurd_extreme_comparisons)]
28846 #[allow(unused_comparisons)]
28847 if __tmp.remaining() < Self::ENCODED_LEN {
28848 panic!(
28849 "buffer is too small (need {} bytes, but got {})",
28850 Self::ENCODED_LEN,
28851 __tmp.remaining(),
28852 )
28853 }
28854 __tmp.put_f32_le(self.p1x);
28855 __tmp.put_f32_le(self.p1y);
28856 __tmp.put_f32_le(self.p1z);
28857 __tmp.put_f32_le(self.p2x);
28858 __tmp.put_f32_le(self.p2y);
28859 __tmp.put_f32_le(self.p2z);
28860 __tmp.put_u8(self.target_system);
28861 __tmp.put_u8(self.target_component);
28862 __tmp.put_u8(self.frame as u8);
28863 if matches!(version, MavlinkVersion::V2) {
28864 let len = __tmp.len();
28865 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28866 } else {
28867 __tmp.len()
28868 }
28869 }
28870}
28871#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
28872#[doc = ""]
28873#[doc = "ID: 26"]
28874#[derive(Debug, Clone, PartialEq)]
28875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28877#[cfg_attr(feature = "ts", derive(TS))]
28878#[cfg_attr(feature = "ts", ts(export))]
28879pub struct SCALED_IMU_DATA {
28880 #[doc = "Timestamp (time since system boot)."]
28881 pub time_boot_ms: u32,
28882 #[doc = "X acceleration"]
28883 pub xacc: i16,
28884 #[doc = "Y acceleration"]
28885 pub yacc: i16,
28886 #[doc = "Z acceleration"]
28887 pub zacc: i16,
28888 #[doc = "Angular speed around X axis"]
28889 pub xgyro: i16,
28890 #[doc = "Angular speed around Y axis"]
28891 pub ygyro: i16,
28892 #[doc = "Angular speed around Z axis"]
28893 pub zgyro: i16,
28894 #[doc = "X Magnetic field"]
28895 pub xmag: i16,
28896 #[doc = "Y Magnetic field"]
28897 pub ymag: i16,
28898 #[doc = "Z Magnetic field"]
28899 pub zmag: i16,
28900 #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
28901 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28902 pub temperature: i16,
28903}
28904impl SCALED_IMU_DATA {
28905 pub const ENCODED_LEN: usize = 24usize;
28906 pub const DEFAULT: Self = Self {
28907 time_boot_ms: 0_u32,
28908 xacc: 0_i16,
28909 yacc: 0_i16,
28910 zacc: 0_i16,
28911 xgyro: 0_i16,
28912 ygyro: 0_i16,
28913 zgyro: 0_i16,
28914 xmag: 0_i16,
28915 ymag: 0_i16,
28916 zmag: 0_i16,
28917 temperature: 0_i16,
28918 };
28919 #[cfg(feature = "arbitrary")]
28920 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28921 use arbitrary::{Arbitrary, Unstructured};
28922 let mut buf = [0u8; 1024];
28923 rng.fill_bytes(&mut buf);
28924 let mut unstructured = Unstructured::new(&buf);
28925 Self::arbitrary(&mut unstructured).unwrap_or_default()
28926 }
28927}
28928impl Default for SCALED_IMU_DATA {
28929 fn default() -> Self {
28930 Self::DEFAULT.clone()
28931 }
28932}
28933impl MessageData for SCALED_IMU_DATA {
28934 type Message = MavMessage;
28935 const ID: u32 = 26u32;
28936 const NAME: &'static str = "SCALED_IMU";
28937 const EXTRA_CRC: u8 = 170u8;
28938 const ENCODED_LEN: usize = 24usize;
28939 fn deser(
28940 _version: MavlinkVersion,
28941 __input: &[u8],
28942 ) -> Result<Self, ::mavlink_core::error::ParserError> {
28943 let avail_len = __input.len();
28944 let mut payload_buf = [0; Self::ENCODED_LEN];
28945 let mut buf = if avail_len < Self::ENCODED_LEN {
28946 payload_buf[0..avail_len].copy_from_slice(__input);
28947 Bytes::new(&payload_buf)
28948 } else {
28949 Bytes::new(__input)
28950 };
28951 let mut __struct = Self::default();
28952 __struct.time_boot_ms = buf.get_u32_le()?;
28953 __struct.xacc = buf.get_i16_le()?;
28954 __struct.yacc = buf.get_i16_le()?;
28955 __struct.zacc = buf.get_i16_le()?;
28956 __struct.xgyro = buf.get_i16_le()?;
28957 __struct.ygyro = buf.get_i16_le()?;
28958 __struct.zgyro = buf.get_i16_le()?;
28959 __struct.xmag = buf.get_i16_le()?;
28960 __struct.ymag = buf.get_i16_le()?;
28961 __struct.zmag = buf.get_i16_le()?;
28962 __struct.temperature = buf.get_i16_le()?;
28963 Ok(__struct)
28964 }
28965 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28966 let mut __tmp = BytesMut::new(bytes);
28967 #[allow(clippy::absurd_extreme_comparisons)]
28968 #[allow(unused_comparisons)]
28969 if __tmp.remaining() < Self::ENCODED_LEN {
28970 panic!(
28971 "buffer is too small (need {} bytes, but got {})",
28972 Self::ENCODED_LEN,
28973 __tmp.remaining(),
28974 )
28975 }
28976 __tmp.put_u32_le(self.time_boot_ms);
28977 __tmp.put_i16_le(self.xacc);
28978 __tmp.put_i16_le(self.yacc);
28979 __tmp.put_i16_le(self.zacc);
28980 __tmp.put_i16_le(self.xgyro);
28981 __tmp.put_i16_le(self.ygyro);
28982 __tmp.put_i16_le(self.zgyro);
28983 __tmp.put_i16_le(self.xmag);
28984 __tmp.put_i16_le(self.ymag);
28985 __tmp.put_i16_le(self.zmag);
28986 if matches!(version, MavlinkVersion::V2) {
28987 __tmp.put_i16_le(self.temperature);
28988 let len = __tmp.len();
28989 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28990 } else {
28991 __tmp.len()
28992 }
28993 }
28994}
28995#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
28996#[doc = ""]
28997#[doc = "ID: 116"]
28998#[derive(Debug, Clone, PartialEq)]
28999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29001#[cfg_attr(feature = "ts", derive(TS))]
29002#[cfg_attr(feature = "ts", ts(export))]
29003pub struct SCALED_IMU2_DATA {
29004 #[doc = "Timestamp (time since system boot)."]
29005 pub time_boot_ms: u32,
29006 #[doc = "X acceleration"]
29007 pub xacc: i16,
29008 #[doc = "Y acceleration"]
29009 pub yacc: i16,
29010 #[doc = "Z acceleration"]
29011 pub zacc: i16,
29012 #[doc = "Angular speed around X axis"]
29013 pub xgyro: i16,
29014 #[doc = "Angular speed around Y axis"]
29015 pub ygyro: i16,
29016 #[doc = "Angular speed around Z axis"]
29017 pub zgyro: i16,
29018 #[doc = "X Magnetic field"]
29019 pub xmag: i16,
29020 #[doc = "Y Magnetic field"]
29021 pub ymag: i16,
29022 #[doc = "Z Magnetic field"]
29023 pub zmag: i16,
29024 #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
29025 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29026 pub temperature: i16,
29027}
29028impl SCALED_IMU2_DATA {
29029 pub const ENCODED_LEN: usize = 24usize;
29030 pub const DEFAULT: Self = Self {
29031 time_boot_ms: 0_u32,
29032 xacc: 0_i16,
29033 yacc: 0_i16,
29034 zacc: 0_i16,
29035 xgyro: 0_i16,
29036 ygyro: 0_i16,
29037 zgyro: 0_i16,
29038 xmag: 0_i16,
29039 ymag: 0_i16,
29040 zmag: 0_i16,
29041 temperature: 0_i16,
29042 };
29043 #[cfg(feature = "arbitrary")]
29044 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29045 use arbitrary::{Arbitrary, Unstructured};
29046 let mut buf = [0u8; 1024];
29047 rng.fill_bytes(&mut buf);
29048 let mut unstructured = Unstructured::new(&buf);
29049 Self::arbitrary(&mut unstructured).unwrap_or_default()
29050 }
29051}
29052impl Default for SCALED_IMU2_DATA {
29053 fn default() -> Self {
29054 Self::DEFAULT.clone()
29055 }
29056}
29057impl MessageData for SCALED_IMU2_DATA {
29058 type Message = MavMessage;
29059 const ID: u32 = 116u32;
29060 const NAME: &'static str = "SCALED_IMU2";
29061 const EXTRA_CRC: u8 = 76u8;
29062 const ENCODED_LEN: usize = 24usize;
29063 fn deser(
29064 _version: MavlinkVersion,
29065 __input: &[u8],
29066 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29067 let avail_len = __input.len();
29068 let mut payload_buf = [0; Self::ENCODED_LEN];
29069 let mut buf = if avail_len < Self::ENCODED_LEN {
29070 payload_buf[0..avail_len].copy_from_slice(__input);
29071 Bytes::new(&payload_buf)
29072 } else {
29073 Bytes::new(__input)
29074 };
29075 let mut __struct = Self::default();
29076 __struct.time_boot_ms = buf.get_u32_le()?;
29077 __struct.xacc = buf.get_i16_le()?;
29078 __struct.yacc = buf.get_i16_le()?;
29079 __struct.zacc = buf.get_i16_le()?;
29080 __struct.xgyro = buf.get_i16_le()?;
29081 __struct.ygyro = buf.get_i16_le()?;
29082 __struct.zgyro = buf.get_i16_le()?;
29083 __struct.xmag = buf.get_i16_le()?;
29084 __struct.ymag = buf.get_i16_le()?;
29085 __struct.zmag = buf.get_i16_le()?;
29086 __struct.temperature = buf.get_i16_le()?;
29087 Ok(__struct)
29088 }
29089 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29090 let mut __tmp = BytesMut::new(bytes);
29091 #[allow(clippy::absurd_extreme_comparisons)]
29092 #[allow(unused_comparisons)]
29093 if __tmp.remaining() < Self::ENCODED_LEN {
29094 panic!(
29095 "buffer is too small (need {} bytes, but got {})",
29096 Self::ENCODED_LEN,
29097 __tmp.remaining(),
29098 )
29099 }
29100 __tmp.put_u32_le(self.time_boot_ms);
29101 __tmp.put_i16_le(self.xacc);
29102 __tmp.put_i16_le(self.yacc);
29103 __tmp.put_i16_le(self.zacc);
29104 __tmp.put_i16_le(self.xgyro);
29105 __tmp.put_i16_le(self.ygyro);
29106 __tmp.put_i16_le(self.zgyro);
29107 __tmp.put_i16_le(self.xmag);
29108 __tmp.put_i16_le(self.ymag);
29109 __tmp.put_i16_le(self.zmag);
29110 if matches!(version, MavlinkVersion::V2) {
29111 __tmp.put_i16_le(self.temperature);
29112 let len = __tmp.len();
29113 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29114 } else {
29115 __tmp.len()
29116 }
29117 }
29118}
29119#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
29120#[doc = ""]
29121#[doc = "ID: 129"]
29122#[derive(Debug, Clone, PartialEq)]
29123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29125#[cfg_attr(feature = "ts", derive(TS))]
29126#[cfg_attr(feature = "ts", ts(export))]
29127pub struct SCALED_IMU3_DATA {
29128 #[doc = "Timestamp (time since system boot)."]
29129 pub time_boot_ms: u32,
29130 #[doc = "X acceleration"]
29131 pub xacc: i16,
29132 #[doc = "Y acceleration"]
29133 pub yacc: i16,
29134 #[doc = "Z acceleration"]
29135 pub zacc: i16,
29136 #[doc = "Angular speed around X axis"]
29137 pub xgyro: i16,
29138 #[doc = "Angular speed around Y axis"]
29139 pub ygyro: i16,
29140 #[doc = "Angular speed around Z axis"]
29141 pub zgyro: i16,
29142 #[doc = "X Magnetic field"]
29143 pub xmag: i16,
29144 #[doc = "Y Magnetic field"]
29145 pub ymag: i16,
29146 #[doc = "Z Magnetic field"]
29147 pub zmag: i16,
29148 #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
29149 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29150 pub temperature: i16,
29151}
29152impl SCALED_IMU3_DATA {
29153 pub const ENCODED_LEN: usize = 24usize;
29154 pub const DEFAULT: Self = Self {
29155 time_boot_ms: 0_u32,
29156 xacc: 0_i16,
29157 yacc: 0_i16,
29158 zacc: 0_i16,
29159 xgyro: 0_i16,
29160 ygyro: 0_i16,
29161 zgyro: 0_i16,
29162 xmag: 0_i16,
29163 ymag: 0_i16,
29164 zmag: 0_i16,
29165 temperature: 0_i16,
29166 };
29167 #[cfg(feature = "arbitrary")]
29168 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29169 use arbitrary::{Arbitrary, Unstructured};
29170 let mut buf = [0u8; 1024];
29171 rng.fill_bytes(&mut buf);
29172 let mut unstructured = Unstructured::new(&buf);
29173 Self::arbitrary(&mut unstructured).unwrap_or_default()
29174 }
29175}
29176impl Default for SCALED_IMU3_DATA {
29177 fn default() -> Self {
29178 Self::DEFAULT.clone()
29179 }
29180}
29181impl MessageData for SCALED_IMU3_DATA {
29182 type Message = MavMessage;
29183 const ID: u32 = 129u32;
29184 const NAME: &'static str = "SCALED_IMU3";
29185 const EXTRA_CRC: u8 = 46u8;
29186 const ENCODED_LEN: usize = 24usize;
29187 fn deser(
29188 _version: MavlinkVersion,
29189 __input: &[u8],
29190 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29191 let avail_len = __input.len();
29192 let mut payload_buf = [0; Self::ENCODED_LEN];
29193 let mut buf = if avail_len < Self::ENCODED_LEN {
29194 payload_buf[0..avail_len].copy_from_slice(__input);
29195 Bytes::new(&payload_buf)
29196 } else {
29197 Bytes::new(__input)
29198 };
29199 let mut __struct = Self::default();
29200 __struct.time_boot_ms = buf.get_u32_le()?;
29201 __struct.xacc = buf.get_i16_le()?;
29202 __struct.yacc = buf.get_i16_le()?;
29203 __struct.zacc = buf.get_i16_le()?;
29204 __struct.xgyro = buf.get_i16_le()?;
29205 __struct.ygyro = buf.get_i16_le()?;
29206 __struct.zgyro = buf.get_i16_le()?;
29207 __struct.xmag = buf.get_i16_le()?;
29208 __struct.ymag = buf.get_i16_le()?;
29209 __struct.zmag = buf.get_i16_le()?;
29210 __struct.temperature = buf.get_i16_le()?;
29211 Ok(__struct)
29212 }
29213 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29214 let mut __tmp = BytesMut::new(bytes);
29215 #[allow(clippy::absurd_extreme_comparisons)]
29216 #[allow(unused_comparisons)]
29217 if __tmp.remaining() < Self::ENCODED_LEN {
29218 panic!(
29219 "buffer is too small (need {} bytes, but got {})",
29220 Self::ENCODED_LEN,
29221 __tmp.remaining(),
29222 )
29223 }
29224 __tmp.put_u32_le(self.time_boot_ms);
29225 __tmp.put_i16_le(self.xacc);
29226 __tmp.put_i16_le(self.yacc);
29227 __tmp.put_i16_le(self.zacc);
29228 __tmp.put_i16_le(self.xgyro);
29229 __tmp.put_i16_le(self.ygyro);
29230 __tmp.put_i16_le(self.zgyro);
29231 __tmp.put_i16_le(self.xmag);
29232 __tmp.put_i16_le(self.ymag);
29233 __tmp.put_i16_le(self.zmag);
29234 if matches!(version, MavlinkVersion::V2) {
29235 __tmp.put_i16_le(self.temperature);
29236 let len = __tmp.len();
29237 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29238 } else {
29239 __tmp.len()
29240 }
29241 }
29242}
29243#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
29244#[doc = ""]
29245#[doc = "ID: 29"]
29246#[derive(Debug, Clone, PartialEq)]
29247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29248#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29249#[cfg_attr(feature = "ts", derive(TS))]
29250#[cfg_attr(feature = "ts", ts(export))]
29251pub struct SCALED_PRESSURE_DATA {
29252 #[doc = "Timestamp (time since system boot)."]
29253 pub time_boot_ms: u32,
29254 #[doc = "Absolute pressure"]
29255 pub press_abs: f32,
29256 #[doc = "Differential pressure 1"]
29257 pub press_diff: f32,
29258 #[doc = "Absolute pressure temperature"]
29259 pub temperature: i16,
29260 #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
29261 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29262 pub temperature_press_diff: i16,
29263}
29264impl SCALED_PRESSURE_DATA {
29265 pub const ENCODED_LEN: usize = 16usize;
29266 pub const DEFAULT: Self = Self {
29267 time_boot_ms: 0_u32,
29268 press_abs: 0.0_f32,
29269 press_diff: 0.0_f32,
29270 temperature: 0_i16,
29271 temperature_press_diff: 0_i16,
29272 };
29273 #[cfg(feature = "arbitrary")]
29274 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29275 use arbitrary::{Arbitrary, Unstructured};
29276 let mut buf = [0u8; 1024];
29277 rng.fill_bytes(&mut buf);
29278 let mut unstructured = Unstructured::new(&buf);
29279 Self::arbitrary(&mut unstructured).unwrap_or_default()
29280 }
29281}
29282impl Default for SCALED_PRESSURE_DATA {
29283 fn default() -> Self {
29284 Self::DEFAULT.clone()
29285 }
29286}
29287impl MessageData for SCALED_PRESSURE_DATA {
29288 type Message = MavMessage;
29289 const ID: u32 = 29u32;
29290 const NAME: &'static str = "SCALED_PRESSURE";
29291 const EXTRA_CRC: u8 = 115u8;
29292 const ENCODED_LEN: usize = 16usize;
29293 fn deser(
29294 _version: MavlinkVersion,
29295 __input: &[u8],
29296 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29297 let avail_len = __input.len();
29298 let mut payload_buf = [0; Self::ENCODED_LEN];
29299 let mut buf = if avail_len < Self::ENCODED_LEN {
29300 payload_buf[0..avail_len].copy_from_slice(__input);
29301 Bytes::new(&payload_buf)
29302 } else {
29303 Bytes::new(__input)
29304 };
29305 let mut __struct = Self::default();
29306 __struct.time_boot_ms = buf.get_u32_le()?;
29307 __struct.press_abs = buf.get_f32_le()?;
29308 __struct.press_diff = buf.get_f32_le()?;
29309 __struct.temperature = buf.get_i16_le()?;
29310 __struct.temperature_press_diff = buf.get_i16_le()?;
29311 Ok(__struct)
29312 }
29313 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29314 let mut __tmp = BytesMut::new(bytes);
29315 #[allow(clippy::absurd_extreme_comparisons)]
29316 #[allow(unused_comparisons)]
29317 if __tmp.remaining() < Self::ENCODED_LEN {
29318 panic!(
29319 "buffer is too small (need {} bytes, but got {})",
29320 Self::ENCODED_LEN,
29321 __tmp.remaining(),
29322 )
29323 }
29324 __tmp.put_u32_le(self.time_boot_ms);
29325 __tmp.put_f32_le(self.press_abs);
29326 __tmp.put_f32_le(self.press_diff);
29327 __tmp.put_i16_le(self.temperature);
29328 if matches!(version, MavlinkVersion::V2) {
29329 __tmp.put_i16_le(self.temperature_press_diff);
29330 let len = __tmp.len();
29331 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29332 } else {
29333 __tmp.len()
29334 }
29335 }
29336}
29337#[doc = "Barometer readings for 2nd barometer."]
29338#[doc = ""]
29339#[doc = "ID: 137"]
29340#[derive(Debug, Clone, PartialEq)]
29341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29343#[cfg_attr(feature = "ts", derive(TS))]
29344#[cfg_attr(feature = "ts", ts(export))]
29345pub struct SCALED_PRESSURE2_DATA {
29346 #[doc = "Timestamp (time since system boot)."]
29347 pub time_boot_ms: u32,
29348 #[doc = "Absolute pressure"]
29349 pub press_abs: f32,
29350 #[doc = "Differential pressure"]
29351 pub press_diff: f32,
29352 #[doc = "Absolute pressure temperature"]
29353 pub temperature: i16,
29354 #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
29355 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29356 pub temperature_press_diff: i16,
29357}
29358impl SCALED_PRESSURE2_DATA {
29359 pub const ENCODED_LEN: usize = 16usize;
29360 pub const DEFAULT: Self = Self {
29361 time_boot_ms: 0_u32,
29362 press_abs: 0.0_f32,
29363 press_diff: 0.0_f32,
29364 temperature: 0_i16,
29365 temperature_press_diff: 0_i16,
29366 };
29367 #[cfg(feature = "arbitrary")]
29368 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29369 use arbitrary::{Arbitrary, Unstructured};
29370 let mut buf = [0u8; 1024];
29371 rng.fill_bytes(&mut buf);
29372 let mut unstructured = Unstructured::new(&buf);
29373 Self::arbitrary(&mut unstructured).unwrap_or_default()
29374 }
29375}
29376impl Default for SCALED_PRESSURE2_DATA {
29377 fn default() -> Self {
29378 Self::DEFAULT.clone()
29379 }
29380}
29381impl MessageData for SCALED_PRESSURE2_DATA {
29382 type Message = MavMessage;
29383 const ID: u32 = 137u32;
29384 const NAME: &'static str = "SCALED_PRESSURE2";
29385 const EXTRA_CRC: u8 = 195u8;
29386 const ENCODED_LEN: usize = 16usize;
29387 fn deser(
29388 _version: MavlinkVersion,
29389 __input: &[u8],
29390 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29391 let avail_len = __input.len();
29392 let mut payload_buf = [0; Self::ENCODED_LEN];
29393 let mut buf = if avail_len < Self::ENCODED_LEN {
29394 payload_buf[0..avail_len].copy_from_slice(__input);
29395 Bytes::new(&payload_buf)
29396 } else {
29397 Bytes::new(__input)
29398 };
29399 let mut __struct = Self::default();
29400 __struct.time_boot_ms = buf.get_u32_le()?;
29401 __struct.press_abs = buf.get_f32_le()?;
29402 __struct.press_diff = buf.get_f32_le()?;
29403 __struct.temperature = buf.get_i16_le()?;
29404 __struct.temperature_press_diff = buf.get_i16_le()?;
29405 Ok(__struct)
29406 }
29407 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29408 let mut __tmp = BytesMut::new(bytes);
29409 #[allow(clippy::absurd_extreme_comparisons)]
29410 #[allow(unused_comparisons)]
29411 if __tmp.remaining() < Self::ENCODED_LEN {
29412 panic!(
29413 "buffer is too small (need {} bytes, but got {})",
29414 Self::ENCODED_LEN,
29415 __tmp.remaining(),
29416 )
29417 }
29418 __tmp.put_u32_le(self.time_boot_ms);
29419 __tmp.put_f32_le(self.press_abs);
29420 __tmp.put_f32_le(self.press_diff);
29421 __tmp.put_i16_le(self.temperature);
29422 if matches!(version, MavlinkVersion::V2) {
29423 __tmp.put_i16_le(self.temperature_press_diff);
29424 let len = __tmp.len();
29425 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29426 } else {
29427 __tmp.len()
29428 }
29429 }
29430}
29431#[doc = "Barometer readings for 3rd barometer."]
29432#[doc = ""]
29433#[doc = "ID: 143"]
29434#[derive(Debug, Clone, PartialEq)]
29435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29437#[cfg_attr(feature = "ts", derive(TS))]
29438#[cfg_attr(feature = "ts", ts(export))]
29439pub struct SCALED_PRESSURE3_DATA {
29440 #[doc = "Timestamp (time since system boot)."]
29441 pub time_boot_ms: u32,
29442 #[doc = "Absolute pressure"]
29443 pub press_abs: f32,
29444 #[doc = "Differential pressure"]
29445 pub press_diff: f32,
29446 #[doc = "Absolute pressure temperature"]
29447 pub temperature: i16,
29448 #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
29449 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29450 pub temperature_press_diff: i16,
29451}
29452impl SCALED_PRESSURE3_DATA {
29453 pub const ENCODED_LEN: usize = 16usize;
29454 pub const DEFAULT: Self = Self {
29455 time_boot_ms: 0_u32,
29456 press_abs: 0.0_f32,
29457 press_diff: 0.0_f32,
29458 temperature: 0_i16,
29459 temperature_press_diff: 0_i16,
29460 };
29461 #[cfg(feature = "arbitrary")]
29462 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29463 use arbitrary::{Arbitrary, Unstructured};
29464 let mut buf = [0u8; 1024];
29465 rng.fill_bytes(&mut buf);
29466 let mut unstructured = Unstructured::new(&buf);
29467 Self::arbitrary(&mut unstructured).unwrap_or_default()
29468 }
29469}
29470impl Default for SCALED_PRESSURE3_DATA {
29471 fn default() -> Self {
29472 Self::DEFAULT.clone()
29473 }
29474}
29475impl MessageData for SCALED_PRESSURE3_DATA {
29476 type Message = MavMessage;
29477 const ID: u32 = 143u32;
29478 const NAME: &'static str = "SCALED_PRESSURE3";
29479 const EXTRA_CRC: u8 = 131u8;
29480 const ENCODED_LEN: usize = 16usize;
29481 fn deser(
29482 _version: MavlinkVersion,
29483 __input: &[u8],
29484 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29485 let avail_len = __input.len();
29486 let mut payload_buf = [0; Self::ENCODED_LEN];
29487 let mut buf = if avail_len < Self::ENCODED_LEN {
29488 payload_buf[0..avail_len].copy_from_slice(__input);
29489 Bytes::new(&payload_buf)
29490 } else {
29491 Bytes::new(__input)
29492 };
29493 let mut __struct = Self::default();
29494 __struct.time_boot_ms = buf.get_u32_le()?;
29495 __struct.press_abs = buf.get_f32_le()?;
29496 __struct.press_diff = buf.get_f32_le()?;
29497 __struct.temperature = buf.get_i16_le()?;
29498 __struct.temperature_press_diff = buf.get_i16_le()?;
29499 Ok(__struct)
29500 }
29501 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29502 let mut __tmp = BytesMut::new(bytes);
29503 #[allow(clippy::absurd_extreme_comparisons)]
29504 #[allow(unused_comparisons)]
29505 if __tmp.remaining() < Self::ENCODED_LEN {
29506 panic!(
29507 "buffer is too small (need {} bytes, but got {})",
29508 Self::ENCODED_LEN,
29509 __tmp.remaining(),
29510 )
29511 }
29512 __tmp.put_u32_le(self.time_boot_ms);
29513 __tmp.put_f32_le(self.press_abs);
29514 __tmp.put_f32_le(self.press_diff);
29515 __tmp.put_i16_le(self.temperature);
29516 if matches!(version, MavlinkVersion::V2) {
29517 __tmp.put_i16_le(self.temperature_press_diff);
29518 let len = __tmp.len();
29519 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29520 } else {
29521 __tmp.len()
29522 }
29523 }
29524}
29525#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
29526#[doc = ""]
29527#[doc = "ID: 126"]
29528#[derive(Debug, Clone, PartialEq)]
29529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29531#[cfg_attr(feature = "ts", derive(TS))]
29532#[cfg_attr(feature = "ts", ts(export))]
29533pub struct SERIAL_CONTROL_DATA {
29534 #[doc = "Baudrate of transfer. Zero means no change."]
29535 pub baudrate: u32,
29536 #[doc = "Timeout for reply data"]
29537 pub timeout: u16,
29538 #[doc = "Serial control device type."]
29539 pub device: SerialControlDev,
29540 #[doc = "Bitmap of serial control flags."]
29541 pub flags: SerialControlFlag,
29542 #[doc = "how many bytes in this transfer"]
29543 pub count: u8,
29544 #[doc = "serial data"]
29545 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29546 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29547 pub data: [u8; 70],
29548 #[doc = "System ID"]
29549 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29550 pub target_system: u8,
29551 #[doc = "Component ID"]
29552 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29553 pub target_component: u8,
29554}
29555impl SERIAL_CONTROL_DATA {
29556 pub const ENCODED_LEN: usize = 81usize;
29557 pub const DEFAULT: Self = Self {
29558 baudrate: 0_u32,
29559 timeout: 0_u16,
29560 device: SerialControlDev::DEFAULT,
29561 flags: SerialControlFlag::DEFAULT,
29562 count: 0_u8,
29563 data: [0_u8; 70usize],
29564 target_system: 0_u8,
29565 target_component: 0_u8,
29566 };
29567 #[cfg(feature = "arbitrary")]
29568 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29569 use arbitrary::{Arbitrary, Unstructured};
29570 let mut buf = [0u8; 1024];
29571 rng.fill_bytes(&mut buf);
29572 let mut unstructured = Unstructured::new(&buf);
29573 Self::arbitrary(&mut unstructured).unwrap_or_default()
29574 }
29575}
29576impl Default for SERIAL_CONTROL_DATA {
29577 fn default() -> Self {
29578 Self::DEFAULT.clone()
29579 }
29580}
29581impl MessageData for SERIAL_CONTROL_DATA {
29582 type Message = MavMessage;
29583 const ID: u32 = 126u32;
29584 const NAME: &'static str = "SERIAL_CONTROL";
29585 const EXTRA_CRC: u8 = 220u8;
29586 const ENCODED_LEN: usize = 81usize;
29587 fn deser(
29588 _version: MavlinkVersion,
29589 __input: &[u8],
29590 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29591 let avail_len = __input.len();
29592 let mut payload_buf = [0; Self::ENCODED_LEN];
29593 let mut buf = if avail_len < Self::ENCODED_LEN {
29594 payload_buf[0..avail_len].copy_from_slice(__input);
29595 Bytes::new(&payload_buf)
29596 } else {
29597 Bytes::new(__input)
29598 };
29599 let mut __struct = Self::default();
29600 __struct.baudrate = buf.get_u32_le()?;
29601 __struct.timeout = buf.get_u16_le()?;
29602 let tmp = buf.get_u8()?;
29603 __struct.device =
29604 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29605 enum_type: "SerialControlDev",
29606 value: tmp as u64,
29607 })?;
29608 let tmp = buf.get_u8()?;
29609 __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
29610 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29611 flag_type: "SerialControlFlag",
29612 value: tmp as u64,
29613 })?;
29614 __struct.count = buf.get_u8()?;
29615 for v in &mut __struct.data {
29616 let val = buf.get_u8()?;
29617 *v = val;
29618 }
29619 __struct.target_system = buf.get_u8()?;
29620 __struct.target_component = buf.get_u8()?;
29621 Ok(__struct)
29622 }
29623 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29624 let mut __tmp = BytesMut::new(bytes);
29625 #[allow(clippy::absurd_extreme_comparisons)]
29626 #[allow(unused_comparisons)]
29627 if __tmp.remaining() < Self::ENCODED_LEN {
29628 panic!(
29629 "buffer is too small (need {} bytes, but got {})",
29630 Self::ENCODED_LEN,
29631 __tmp.remaining(),
29632 )
29633 }
29634 __tmp.put_u32_le(self.baudrate);
29635 __tmp.put_u16_le(self.timeout);
29636 __tmp.put_u8(self.device as u8);
29637 __tmp.put_u8(self.flags.bits() as u8);
29638 __tmp.put_u8(self.count);
29639 for val in &self.data {
29640 __tmp.put_u8(*val);
29641 }
29642 if matches!(version, MavlinkVersion::V2) {
29643 __tmp.put_u8(self.target_system);
29644 __tmp.put_u8(self.target_component);
29645 let len = __tmp.len();
29646 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29647 } else {
29648 __tmp.len()
29649 }
29650 }
29651}
29652#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
29653#[doc = ""]
29654#[doc = "ID: 36"]
29655#[derive(Debug, Clone, PartialEq)]
29656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29658#[cfg_attr(feature = "ts", derive(TS))]
29659#[cfg_attr(feature = "ts", ts(export))]
29660pub struct SERVO_OUTPUT_RAW_DATA {
29661 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29662 pub time_usec: u32,
29663 #[doc = "Servo output 1 value"]
29664 pub servo1_raw: u16,
29665 #[doc = "Servo output 2 value"]
29666 pub servo2_raw: u16,
29667 #[doc = "Servo output 3 value"]
29668 pub servo3_raw: u16,
29669 #[doc = "Servo output 4 value"]
29670 pub servo4_raw: u16,
29671 #[doc = "Servo output 5 value"]
29672 pub servo5_raw: u16,
29673 #[doc = "Servo output 6 value"]
29674 pub servo6_raw: u16,
29675 #[doc = "Servo output 7 value"]
29676 pub servo7_raw: u16,
29677 #[doc = "Servo output 8 value"]
29678 pub servo8_raw: u16,
29679 #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
29680 pub port: u8,
29681 #[doc = "Servo output 9 value"]
29682 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29683 pub servo9_raw: u16,
29684 #[doc = "Servo output 10 value"]
29685 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29686 pub servo10_raw: u16,
29687 #[doc = "Servo output 11 value"]
29688 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29689 pub servo11_raw: u16,
29690 #[doc = "Servo output 12 value"]
29691 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29692 pub servo12_raw: u16,
29693 #[doc = "Servo output 13 value"]
29694 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29695 pub servo13_raw: u16,
29696 #[doc = "Servo output 14 value"]
29697 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29698 pub servo14_raw: u16,
29699 #[doc = "Servo output 15 value"]
29700 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29701 pub servo15_raw: u16,
29702 #[doc = "Servo output 16 value"]
29703 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29704 pub servo16_raw: u16,
29705}
29706impl SERVO_OUTPUT_RAW_DATA {
29707 pub const ENCODED_LEN: usize = 37usize;
29708 pub const DEFAULT: Self = Self {
29709 time_usec: 0_u32,
29710 servo1_raw: 0_u16,
29711 servo2_raw: 0_u16,
29712 servo3_raw: 0_u16,
29713 servo4_raw: 0_u16,
29714 servo5_raw: 0_u16,
29715 servo6_raw: 0_u16,
29716 servo7_raw: 0_u16,
29717 servo8_raw: 0_u16,
29718 port: 0_u8,
29719 servo9_raw: 0_u16,
29720 servo10_raw: 0_u16,
29721 servo11_raw: 0_u16,
29722 servo12_raw: 0_u16,
29723 servo13_raw: 0_u16,
29724 servo14_raw: 0_u16,
29725 servo15_raw: 0_u16,
29726 servo16_raw: 0_u16,
29727 };
29728 #[cfg(feature = "arbitrary")]
29729 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29730 use arbitrary::{Arbitrary, Unstructured};
29731 let mut buf = [0u8; 1024];
29732 rng.fill_bytes(&mut buf);
29733 let mut unstructured = Unstructured::new(&buf);
29734 Self::arbitrary(&mut unstructured).unwrap_or_default()
29735 }
29736}
29737impl Default for SERVO_OUTPUT_RAW_DATA {
29738 fn default() -> Self {
29739 Self::DEFAULT.clone()
29740 }
29741}
29742impl MessageData for SERVO_OUTPUT_RAW_DATA {
29743 type Message = MavMessage;
29744 const ID: u32 = 36u32;
29745 const NAME: &'static str = "SERVO_OUTPUT_RAW";
29746 const EXTRA_CRC: u8 = 222u8;
29747 const ENCODED_LEN: usize = 37usize;
29748 fn deser(
29749 _version: MavlinkVersion,
29750 __input: &[u8],
29751 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29752 let avail_len = __input.len();
29753 let mut payload_buf = [0; Self::ENCODED_LEN];
29754 let mut buf = if avail_len < Self::ENCODED_LEN {
29755 payload_buf[0..avail_len].copy_from_slice(__input);
29756 Bytes::new(&payload_buf)
29757 } else {
29758 Bytes::new(__input)
29759 };
29760 let mut __struct = Self::default();
29761 __struct.time_usec = buf.get_u32_le()?;
29762 __struct.servo1_raw = buf.get_u16_le()?;
29763 __struct.servo2_raw = buf.get_u16_le()?;
29764 __struct.servo3_raw = buf.get_u16_le()?;
29765 __struct.servo4_raw = buf.get_u16_le()?;
29766 __struct.servo5_raw = buf.get_u16_le()?;
29767 __struct.servo6_raw = buf.get_u16_le()?;
29768 __struct.servo7_raw = buf.get_u16_le()?;
29769 __struct.servo8_raw = buf.get_u16_le()?;
29770 __struct.port = buf.get_u8()?;
29771 __struct.servo9_raw = buf.get_u16_le()?;
29772 __struct.servo10_raw = buf.get_u16_le()?;
29773 __struct.servo11_raw = buf.get_u16_le()?;
29774 __struct.servo12_raw = buf.get_u16_le()?;
29775 __struct.servo13_raw = buf.get_u16_le()?;
29776 __struct.servo14_raw = buf.get_u16_le()?;
29777 __struct.servo15_raw = buf.get_u16_le()?;
29778 __struct.servo16_raw = buf.get_u16_le()?;
29779 Ok(__struct)
29780 }
29781 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29782 let mut __tmp = BytesMut::new(bytes);
29783 #[allow(clippy::absurd_extreme_comparisons)]
29784 #[allow(unused_comparisons)]
29785 if __tmp.remaining() < Self::ENCODED_LEN {
29786 panic!(
29787 "buffer is too small (need {} bytes, but got {})",
29788 Self::ENCODED_LEN,
29789 __tmp.remaining(),
29790 )
29791 }
29792 __tmp.put_u32_le(self.time_usec);
29793 __tmp.put_u16_le(self.servo1_raw);
29794 __tmp.put_u16_le(self.servo2_raw);
29795 __tmp.put_u16_le(self.servo3_raw);
29796 __tmp.put_u16_le(self.servo4_raw);
29797 __tmp.put_u16_le(self.servo5_raw);
29798 __tmp.put_u16_le(self.servo6_raw);
29799 __tmp.put_u16_le(self.servo7_raw);
29800 __tmp.put_u16_le(self.servo8_raw);
29801 __tmp.put_u8(self.port);
29802 if matches!(version, MavlinkVersion::V2) {
29803 __tmp.put_u16_le(self.servo9_raw);
29804 __tmp.put_u16_le(self.servo10_raw);
29805 __tmp.put_u16_le(self.servo11_raw);
29806 __tmp.put_u16_le(self.servo12_raw);
29807 __tmp.put_u16_le(self.servo13_raw);
29808 __tmp.put_u16_le(self.servo14_raw);
29809 __tmp.put_u16_le(self.servo15_raw);
29810 __tmp.put_u16_le(self.servo16_raw);
29811 let len = __tmp.len();
29812 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29813 } else {
29814 __tmp.len()
29815 }
29816 }
29817}
29818#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
29819#[doc = ""]
29820#[doc = "ID: 256"]
29821#[derive(Debug, Clone, PartialEq)]
29822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29824#[cfg_attr(feature = "ts", derive(TS))]
29825#[cfg_attr(feature = "ts", ts(export))]
29826pub struct SETUP_SIGNING_DATA {
29827 #[doc = "initial timestamp"]
29828 pub initial_timestamp: u64,
29829 #[doc = "system id of the target"]
29830 pub target_system: u8,
29831 #[doc = "component ID of the target"]
29832 pub target_component: u8,
29833 #[doc = "signing key"]
29834 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29835 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29836 pub secret_key: [u8; 32],
29837}
29838impl SETUP_SIGNING_DATA {
29839 pub const ENCODED_LEN: usize = 42usize;
29840 pub const DEFAULT: Self = Self {
29841 initial_timestamp: 0_u64,
29842 target_system: 0_u8,
29843 target_component: 0_u8,
29844 secret_key: [0_u8; 32usize],
29845 };
29846 #[cfg(feature = "arbitrary")]
29847 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29848 use arbitrary::{Arbitrary, Unstructured};
29849 let mut buf = [0u8; 1024];
29850 rng.fill_bytes(&mut buf);
29851 let mut unstructured = Unstructured::new(&buf);
29852 Self::arbitrary(&mut unstructured).unwrap_or_default()
29853 }
29854}
29855impl Default for SETUP_SIGNING_DATA {
29856 fn default() -> Self {
29857 Self::DEFAULT.clone()
29858 }
29859}
29860impl MessageData for SETUP_SIGNING_DATA {
29861 type Message = MavMessage;
29862 const ID: u32 = 256u32;
29863 const NAME: &'static str = "SETUP_SIGNING";
29864 const EXTRA_CRC: u8 = 71u8;
29865 const ENCODED_LEN: usize = 42usize;
29866 fn deser(
29867 _version: MavlinkVersion,
29868 __input: &[u8],
29869 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29870 let avail_len = __input.len();
29871 let mut payload_buf = [0; Self::ENCODED_LEN];
29872 let mut buf = if avail_len < Self::ENCODED_LEN {
29873 payload_buf[0..avail_len].copy_from_slice(__input);
29874 Bytes::new(&payload_buf)
29875 } else {
29876 Bytes::new(__input)
29877 };
29878 let mut __struct = Self::default();
29879 __struct.initial_timestamp = buf.get_u64_le()?;
29880 __struct.target_system = buf.get_u8()?;
29881 __struct.target_component = buf.get_u8()?;
29882 for v in &mut __struct.secret_key {
29883 let val = buf.get_u8()?;
29884 *v = val;
29885 }
29886 Ok(__struct)
29887 }
29888 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29889 let mut __tmp = BytesMut::new(bytes);
29890 #[allow(clippy::absurd_extreme_comparisons)]
29891 #[allow(unused_comparisons)]
29892 if __tmp.remaining() < Self::ENCODED_LEN {
29893 panic!(
29894 "buffer is too small (need {} bytes, but got {})",
29895 Self::ENCODED_LEN,
29896 __tmp.remaining(),
29897 )
29898 }
29899 __tmp.put_u64_le(self.initial_timestamp);
29900 __tmp.put_u8(self.target_system);
29901 __tmp.put_u8(self.target_component);
29902 for val in &self.secret_key {
29903 __tmp.put_u8(*val);
29904 }
29905 if matches!(version, MavlinkVersion::V2) {
29906 let len = __tmp.len();
29907 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29908 } else {
29909 __tmp.len()
29910 }
29911 }
29912}
29913#[doc = "Set the vehicle attitude and body angular rates."]
29914#[doc = ""]
29915#[doc = "ID: 139"]
29916#[derive(Debug, Clone, PartialEq)]
29917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29919#[cfg_attr(feature = "ts", derive(TS))]
29920#[cfg_attr(feature = "ts", ts(export))]
29921pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
29922 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29923 pub time_usec: u64,
29924 #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
29925 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29926 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29927 pub controls: [f32; 8],
29928 #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
29929 pub group_mlx: u8,
29930 #[doc = "System ID"]
29931 pub target_system: u8,
29932 #[doc = "Component ID"]
29933 pub target_component: u8,
29934}
29935impl SET_ACTUATOR_CONTROL_TARGET_DATA {
29936 pub const ENCODED_LEN: usize = 43usize;
29937 pub const DEFAULT: Self = Self {
29938 time_usec: 0_u64,
29939 controls: [0.0_f32; 8usize],
29940 group_mlx: 0_u8,
29941 target_system: 0_u8,
29942 target_component: 0_u8,
29943 };
29944 #[cfg(feature = "arbitrary")]
29945 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29946 use arbitrary::{Arbitrary, Unstructured};
29947 let mut buf = [0u8; 1024];
29948 rng.fill_bytes(&mut buf);
29949 let mut unstructured = Unstructured::new(&buf);
29950 Self::arbitrary(&mut unstructured).unwrap_or_default()
29951 }
29952}
29953impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
29954 fn default() -> Self {
29955 Self::DEFAULT.clone()
29956 }
29957}
29958impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
29959 type Message = MavMessage;
29960 const ID: u32 = 139u32;
29961 const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
29962 const EXTRA_CRC: u8 = 168u8;
29963 const ENCODED_LEN: usize = 43usize;
29964 fn deser(
29965 _version: MavlinkVersion,
29966 __input: &[u8],
29967 ) -> Result<Self, ::mavlink_core::error::ParserError> {
29968 let avail_len = __input.len();
29969 let mut payload_buf = [0; Self::ENCODED_LEN];
29970 let mut buf = if avail_len < Self::ENCODED_LEN {
29971 payload_buf[0..avail_len].copy_from_slice(__input);
29972 Bytes::new(&payload_buf)
29973 } else {
29974 Bytes::new(__input)
29975 };
29976 let mut __struct = Self::default();
29977 __struct.time_usec = buf.get_u64_le()?;
29978 for v in &mut __struct.controls {
29979 let val = buf.get_f32_le()?;
29980 *v = val;
29981 }
29982 __struct.group_mlx = buf.get_u8()?;
29983 __struct.target_system = buf.get_u8()?;
29984 __struct.target_component = buf.get_u8()?;
29985 Ok(__struct)
29986 }
29987 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29988 let mut __tmp = BytesMut::new(bytes);
29989 #[allow(clippy::absurd_extreme_comparisons)]
29990 #[allow(unused_comparisons)]
29991 if __tmp.remaining() < Self::ENCODED_LEN {
29992 panic!(
29993 "buffer is too small (need {} bytes, but got {})",
29994 Self::ENCODED_LEN,
29995 __tmp.remaining(),
29996 )
29997 }
29998 __tmp.put_u64_le(self.time_usec);
29999 for val in &self.controls {
30000 __tmp.put_f32_le(*val);
30001 }
30002 __tmp.put_u8(self.group_mlx);
30003 __tmp.put_u8(self.target_system);
30004 __tmp.put_u8(self.target_component);
30005 if matches!(version, MavlinkVersion::V2) {
30006 let len = __tmp.len();
30007 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30008 } else {
30009 __tmp.len()
30010 }
30011 }
30012}
30013#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
30014#[doc = ""]
30015#[doc = "ID: 82"]
30016#[derive(Debug, Clone, PartialEq)]
30017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30019#[cfg_attr(feature = "ts", derive(TS))]
30020#[cfg_attr(feature = "ts", ts(export))]
30021pub struct SET_ATTITUDE_TARGET_DATA {
30022 #[doc = "Timestamp (time since system boot)."]
30023 pub time_boot_ms: u32,
30024 #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
30025 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30026 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30027 pub q: [f32; 4],
30028 #[doc = "Body roll rate"]
30029 pub body_roll_rate: f32,
30030 #[doc = "Body pitch rate"]
30031 pub body_pitch_rate: f32,
30032 #[doc = "Body yaw rate"]
30033 pub body_yaw_rate: f32,
30034 #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
30035 pub thrust: f32,
30036 #[doc = "System ID"]
30037 pub target_system: u8,
30038 #[doc = "Component ID"]
30039 pub target_component: u8,
30040 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30041 pub type_mask: AttitudeTargetTypemask,
30042 #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
30043 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30044 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30045 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30046 pub thrust_body: [f32; 3],
30047}
30048impl SET_ATTITUDE_TARGET_DATA {
30049 pub const ENCODED_LEN: usize = 51usize;
30050 pub const DEFAULT: Self = Self {
30051 time_boot_ms: 0_u32,
30052 q: [0.0_f32; 4usize],
30053 body_roll_rate: 0.0_f32,
30054 body_pitch_rate: 0.0_f32,
30055 body_yaw_rate: 0.0_f32,
30056 thrust: 0.0_f32,
30057 target_system: 0_u8,
30058 target_component: 0_u8,
30059 type_mask: AttitudeTargetTypemask::DEFAULT,
30060 thrust_body: [0.0_f32; 3usize],
30061 };
30062 #[cfg(feature = "arbitrary")]
30063 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30064 use arbitrary::{Arbitrary, Unstructured};
30065 let mut buf = [0u8; 1024];
30066 rng.fill_bytes(&mut buf);
30067 let mut unstructured = Unstructured::new(&buf);
30068 Self::arbitrary(&mut unstructured).unwrap_or_default()
30069 }
30070}
30071impl Default for SET_ATTITUDE_TARGET_DATA {
30072 fn default() -> Self {
30073 Self::DEFAULT.clone()
30074 }
30075}
30076impl MessageData for SET_ATTITUDE_TARGET_DATA {
30077 type Message = MavMessage;
30078 const ID: u32 = 82u32;
30079 const NAME: &'static str = "SET_ATTITUDE_TARGET";
30080 const EXTRA_CRC: u8 = 49u8;
30081 const ENCODED_LEN: usize = 51usize;
30082 fn deser(
30083 _version: MavlinkVersion,
30084 __input: &[u8],
30085 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30086 let avail_len = __input.len();
30087 let mut payload_buf = [0; Self::ENCODED_LEN];
30088 let mut buf = if avail_len < Self::ENCODED_LEN {
30089 payload_buf[0..avail_len].copy_from_slice(__input);
30090 Bytes::new(&payload_buf)
30091 } else {
30092 Bytes::new(__input)
30093 };
30094 let mut __struct = Self::default();
30095 __struct.time_boot_ms = buf.get_u32_le()?;
30096 for v in &mut __struct.q {
30097 let val = buf.get_f32_le()?;
30098 *v = val;
30099 }
30100 __struct.body_roll_rate = buf.get_f32_le()?;
30101 __struct.body_pitch_rate = buf.get_f32_le()?;
30102 __struct.body_yaw_rate = buf.get_f32_le()?;
30103 __struct.thrust = buf.get_f32_le()?;
30104 __struct.target_system = buf.get_u8()?;
30105 __struct.target_component = buf.get_u8()?;
30106 let tmp = buf.get_u8()?;
30107 __struct.type_mask =
30108 AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
30109 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30110 flag_type: "AttitudeTargetTypemask",
30111 value: tmp as u64,
30112 })?;
30113 for v in &mut __struct.thrust_body {
30114 let val = buf.get_f32_le()?;
30115 *v = val;
30116 }
30117 Ok(__struct)
30118 }
30119 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30120 let mut __tmp = BytesMut::new(bytes);
30121 #[allow(clippy::absurd_extreme_comparisons)]
30122 #[allow(unused_comparisons)]
30123 if __tmp.remaining() < Self::ENCODED_LEN {
30124 panic!(
30125 "buffer is too small (need {} bytes, but got {})",
30126 Self::ENCODED_LEN,
30127 __tmp.remaining(),
30128 )
30129 }
30130 __tmp.put_u32_le(self.time_boot_ms);
30131 for val in &self.q {
30132 __tmp.put_f32_le(*val);
30133 }
30134 __tmp.put_f32_le(self.body_roll_rate);
30135 __tmp.put_f32_le(self.body_pitch_rate);
30136 __tmp.put_f32_le(self.body_yaw_rate);
30137 __tmp.put_f32_le(self.thrust);
30138 __tmp.put_u8(self.target_system);
30139 __tmp.put_u8(self.target_component);
30140 __tmp.put_u8(self.type_mask.bits() as u8);
30141 if matches!(version, MavlinkVersion::V2) {
30142 for val in &self.thrust_body {
30143 __tmp.put_f32_le(*val);
30144 }
30145 let len = __tmp.len();
30146 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30147 } else {
30148 __tmp.len()
30149 }
30150 }
30151}
30152#[deprecated = " See `MAV_CMD_DO_SET_GLOBAL_ORIGIN` (Superseded since 2025-04)"]
30153#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
30154#[doc = ""]
30155#[doc = "ID: 48"]
30156#[derive(Debug, Clone, PartialEq)]
30157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30159#[cfg_attr(feature = "ts", derive(TS))]
30160#[cfg_attr(feature = "ts", ts(export))]
30161pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
30162 #[doc = "Latitude (WGS84)"]
30163 pub latitude: i32,
30164 #[doc = "Longitude (WGS84)"]
30165 pub longitude: i32,
30166 #[doc = "Altitude (MSL). Positive for up."]
30167 pub altitude: i32,
30168 #[doc = "System ID"]
30169 pub target_system: u8,
30170 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30171 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30172 pub time_usec: u64,
30173}
30174impl SET_GPS_GLOBAL_ORIGIN_DATA {
30175 pub const ENCODED_LEN: usize = 21usize;
30176 pub const DEFAULT: Self = Self {
30177 latitude: 0_i32,
30178 longitude: 0_i32,
30179 altitude: 0_i32,
30180 target_system: 0_u8,
30181 time_usec: 0_u64,
30182 };
30183 #[cfg(feature = "arbitrary")]
30184 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30185 use arbitrary::{Arbitrary, Unstructured};
30186 let mut buf = [0u8; 1024];
30187 rng.fill_bytes(&mut buf);
30188 let mut unstructured = Unstructured::new(&buf);
30189 Self::arbitrary(&mut unstructured).unwrap_or_default()
30190 }
30191}
30192impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
30193 fn default() -> Self {
30194 Self::DEFAULT.clone()
30195 }
30196}
30197impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
30198 type Message = MavMessage;
30199 const ID: u32 = 48u32;
30200 const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
30201 const EXTRA_CRC: u8 = 41u8;
30202 const ENCODED_LEN: usize = 21usize;
30203 fn deser(
30204 _version: MavlinkVersion,
30205 __input: &[u8],
30206 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30207 let avail_len = __input.len();
30208 let mut payload_buf = [0; Self::ENCODED_LEN];
30209 let mut buf = if avail_len < Self::ENCODED_LEN {
30210 payload_buf[0..avail_len].copy_from_slice(__input);
30211 Bytes::new(&payload_buf)
30212 } else {
30213 Bytes::new(__input)
30214 };
30215 let mut __struct = Self::default();
30216 __struct.latitude = buf.get_i32_le()?;
30217 __struct.longitude = buf.get_i32_le()?;
30218 __struct.altitude = buf.get_i32_le()?;
30219 __struct.target_system = buf.get_u8()?;
30220 __struct.time_usec = buf.get_u64_le()?;
30221 Ok(__struct)
30222 }
30223 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30224 let mut __tmp = BytesMut::new(bytes);
30225 #[allow(clippy::absurd_extreme_comparisons)]
30226 #[allow(unused_comparisons)]
30227 if __tmp.remaining() < Self::ENCODED_LEN {
30228 panic!(
30229 "buffer is too small (need {} bytes, but got {})",
30230 Self::ENCODED_LEN,
30231 __tmp.remaining(),
30232 )
30233 }
30234 __tmp.put_i32_le(self.latitude);
30235 __tmp.put_i32_le(self.longitude);
30236 __tmp.put_i32_le(self.altitude);
30237 __tmp.put_u8(self.target_system);
30238 if matches!(version, MavlinkVersion::V2) {
30239 __tmp.put_u64_le(self.time_usec);
30240 let len = __tmp.len();
30241 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30242 } else {
30243 __tmp.len()
30244 }
30245 }
30246}
30247#[deprecated = " See `MAV_CMD_DO_SET_HOME` (Superseded since 2022-02)"]
30248#[doc = "Sets the home position. The home position is the default position that the system will return to and land on. The position is set automatically by the system during the takeoff (and may also be set using this message). The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
30249#[doc = ""]
30250#[doc = "ID: 243"]
30251#[derive(Debug, Clone, PartialEq)]
30252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30254#[cfg_attr(feature = "ts", derive(TS))]
30255#[cfg_attr(feature = "ts", ts(export))]
30256pub struct SET_HOME_POSITION_DATA {
30257 #[doc = "Latitude (WGS84)"]
30258 pub latitude: i32,
30259 #[doc = "Longitude (WGS84)"]
30260 pub longitude: i32,
30261 #[doc = "Altitude (MSL). Positive for up."]
30262 pub altitude: i32,
30263 #[doc = "Local X position of this position in the local coordinate frame (NED)"]
30264 pub x: f32,
30265 #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
30266 pub y: f32,
30267 #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
30268 pub z: f32,
30269 #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
30270 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30271 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30272 pub q: [f32; 4],
30273 #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30274 pub approach_x: f32,
30275 #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30276 pub approach_y: f32,
30277 #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30278 pub approach_z: f32,
30279 #[doc = "System ID."]
30280 pub target_system: u8,
30281 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30282 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30283 pub time_usec: u64,
30284}
30285impl SET_HOME_POSITION_DATA {
30286 pub const ENCODED_LEN: usize = 61usize;
30287 pub const DEFAULT: Self = Self {
30288 latitude: 0_i32,
30289 longitude: 0_i32,
30290 altitude: 0_i32,
30291 x: 0.0_f32,
30292 y: 0.0_f32,
30293 z: 0.0_f32,
30294 q: [0.0_f32; 4usize],
30295 approach_x: 0.0_f32,
30296 approach_y: 0.0_f32,
30297 approach_z: 0.0_f32,
30298 target_system: 0_u8,
30299 time_usec: 0_u64,
30300 };
30301 #[cfg(feature = "arbitrary")]
30302 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30303 use arbitrary::{Arbitrary, Unstructured};
30304 let mut buf = [0u8; 1024];
30305 rng.fill_bytes(&mut buf);
30306 let mut unstructured = Unstructured::new(&buf);
30307 Self::arbitrary(&mut unstructured).unwrap_or_default()
30308 }
30309}
30310impl Default for SET_HOME_POSITION_DATA {
30311 fn default() -> Self {
30312 Self::DEFAULT.clone()
30313 }
30314}
30315impl MessageData for SET_HOME_POSITION_DATA {
30316 type Message = MavMessage;
30317 const ID: u32 = 243u32;
30318 const NAME: &'static str = "SET_HOME_POSITION";
30319 const EXTRA_CRC: u8 = 85u8;
30320 const ENCODED_LEN: usize = 61usize;
30321 fn deser(
30322 _version: MavlinkVersion,
30323 __input: &[u8],
30324 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30325 let avail_len = __input.len();
30326 let mut payload_buf = [0; Self::ENCODED_LEN];
30327 let mut buf = if avail_len < Self::ENCODED_LEN {
30328 payload_buf[0..avail_len].copy_from_slice(__input);
30329 Bytes::new(&payload_buf)
30330 } else {
30331 Bytes::new(__input)
30332 };
30333 let mut __struct = Self::default();
30334 __struct.latitude = buf.get_i32_le()?;
30335 __struct.longitude = buf.get_i32_le()?;
30336 __struct.altitude = buf.get_i32_le()?;
30337 __struct.x = buf.get_f32_le()?;
30338 __struct.y = buf.get_f32_le()?;
30339 __struct.z = buf.get_f32_le()?;
30340 for v in &mut __struct.q {
30341 let val = buf.get_f32_le()?;
30342 *v = val;
30343 }
30344 __struct.approach_x = buf.get_f32_le()?;
30345 __struct.approach_y = buf.get_f32_le()?;
30346 __struct.approach_z = buf.get_f32_le()?;
30347 __struct.target_system = buf.get_u8()?;
30348 __struct.time_usec = buf.get_u64_le()?;
30349 Ok(__struct)
30350 }
30351 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30352 let mut __tmp = BytesMut::new(bytes);
30353 #[allow(clippy::absurd_extreme_comparisons)]
30354 #[allow(unused_comparisons)]
30355 if __tmp.remaining() < Self::ENCODED_LEN {
30356 panic!(
30357 "buffer is too small (need {} bytes, but got {})",
30358 Self::ENCODED_LEN,
30359 __tmp.remaining(),
30360 )
30361 }
30362 __tmp.put_i32_le(self.latitude);
30363 __tmp.put_i32_le(self.longitude);
30364 __tmp.put_i32_le(self.altitude);
30365 __tmp.put_f32_le(self.x);
30366 __tmp.put_f32_le(self.y);
30367 __tmp.put_f32_le(self.z);
30368 for val in &self.q {
30369 __tmp.put_f32_le(*val);
30370 }
30371 __tmp.put_f32_le(self.approach_x);
30372 __tmp.put_f32_le(self.approach_y);
30373 __tmp.put_f32_le(self.approach_z);
30374 __tmp.put_u8(self.target_system);
30375 if matches!(version, MavlinkVersion::V2) {
30376 __tmp.put_u64_le(self.time_usec);
30377 let len = __tmp.len();
30378 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30379 } else {
30380 __tmp.len()
30381 }
30382 }
30383}
30384#[deprecated = " See `MAV_CMD_DO_SET_MODE` (Superseded since 2015-12)"]
30385#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
30386#[doc = ""]
30387#[doc = "ID: 11"]
30388#[derive(Debug, Clone, PartialEq)]
30389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30391#[cfg_attr(feature = "ts", derive(TS))]
30392#[cfg_attr(feature = "ts", ts(export))]
30393pub struct SET_MODE_DATA {
30394 #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
30395 pub custom_mode: u32,
30396 #[doc = "The system setting the mode"]
30397 pub target_system: u8,
30398 #[doc = "The new base mode."]
30399 pub base_mode: MavMode,
30400}
30401impl SET_MODE_DATA {
30402 pub const ENCODED_LEN: usize = 6usize;
30403 pub const DEFAULT: Self = Self {
30404 custom_mode: 0_u32,
30405 target_system: 0_u8,
30406 base_mode: MavMode::DEFAULT,
30407 };
30408 #[cfg(feature = "arbitrary")]
30409 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30410 use arbitrary::{Arbitrary, Unstructured};
30411 let mut buf = [0u8; 1024];
30412 rng.fill_bytes(&mut buf);
30413 let mut unstructured = Unstructured::new(&buf);
30414 Self::arbitrary(&mut unstructured).unwrap_or_default()
30415 }
30416}
30417impl Default for SET_MODE_DATA {
30418 fn default() -> Self {
30419 Self::DEFAULT.clone()
30420 }
30421}
30422impl MessageData for SET_MODE_DATA {
30423 type Message = MavMessage;
30424 const ID: u32 = 11u32;
30425 const NAME: &'static str = "SET_MODE";
30426 const EXTRA_CRC: u8 = 89u8;
30427 const ENCODED_LEN: usize = 6usize;
30428 fn deser(
30429 _version: MavlinkVersion,
30430 __input: &[u8],
30431 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30432 let avail_len = __input.len();
30433 let mut payload_buf = [0; Self::ENCODED_LEN];
30434 let mut buf = if avail_len < Self::ENCODED_LEN {
30435 payload_buf[0..avail_len].copy_from_slice(__input);
30436 Bytes::new(&payload_buf)
30437 } else {
30438 Bytes::new(__input)
30439 };
30440 let mut __struct = Self::default();
30441 __struct.custom_mode = buf.get_u32_le()?;
30442 __struct.target_system = buf.get_u8()?;
30443 let tmp = buf.get_u8()?;
30444 __struct.base_mode =
30445 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30446 enum_type: "MavMode",
30447 value: tmp as u64,
30448 })?;
30449 Ok(__struct)
30450 }
30451 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30452 let mut __tmp = BytesMut::new(bytes);
30453 #[allow(clippy::absurd_extreme_comparisons)]
30454 #[allow(unused_comparisons)]
30455 if __tmp.remaining() < Self::ENCODED_LEN {
30456 panic!(
30457 "buffer is too small (need {} bytes, but got {})",
30458 Self::ENCODED_LEN,
30459 __tmp.remaining(),
30460 )
30461 }
30462 __tmp.put_u32_le(self.custom_mode);
30463 __tmp.put_u8(self.target_system);
30464 __tmp.put_u8(self.base_mode as u8);
30465 if matches!(version, MavlinkVersion::V2) {
30466 let len = __tmp.len();
30467 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30468 } else {
30469 __tmp.len()
30470 }
30471 }
30472}
30473#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
30474#[doc = ""]
30475#[doc = "ID: 86"]
30476#[derive(Debug, Clone, PartialEq)]
30477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30479#[cfg_attr(feature = "ts", derive(TS))]
30480#[cfg_attr(feature = "ts", ts(export))]
30481pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
30482 #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
30483 pub time_boot_ms: u32,
30484 #[doc = "Latitude in WGS84 frame"]
30485 pub lat_int: i32,
30486 #[doc = "Longitude in WGS84 frame"]
30487 pub lon_int: i32,
30488 #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
30489 pub alt: f32,
30490 #[doc = "X velocity in NED frame"]
30491 pub vx: f32,
30492 #[doc = "Y velocity in NED frame"]
30493 pub vy: f32,
30494 #[doc = "Z velocity in NED frame"]
30495 pub vz: f32,
30496 #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30497 pub afx: f32,
30498 #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30499 pub afy: f32,
30500 #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30501 pub afz: f32,
30502 #[doc = "yaw setpoint"]
30503 pub yaw: f32,
30504 #[doc = "yaw rate setpoint"]
30505 pub yaw_rate: f32,
30506 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30507 pub type_mask: PositionTargetTypemask,
30508 #[doc = "System ID"]
30509 pub target_system: u8,
30510 #[doc = "Component ID"]
30511 pub target_component: u8,
30512 #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
30513 pub coordinate_frame: MavFrame,
30514}
30515impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
30516 pub const ENCODED_LEN: usize = 53usize;
30517 pub const DEFAULT: Self = Self {
30518 time_boot_ms: 0_u32,
30519 lat_int: 0_i32,
30520 lon_int: 0_i32,
30521 alt: 0.0_f32,
30522 vx: 0.0_f32,
30523 vy: 0.0_f32,
30524 vz: 0.0_f32,
30525 afx: 0.0_f32,
30526 afy: 0.0_f32,
30527 afz: 0.0_f32,
30528 yaw: 0.0_f32,
30529 yaw_rate: 0.0_f32,
30530 type_mask: PositionTargetTypemask::DEFAULT,
30531 target_system: 0_u8,
30532 target_component: 0_u8,
30533 coordinate_frame: MavFrame::DEFAULT,
30534 };
30535 #[cfg(feature = "arbitrary")]
30536 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30537 use arbitrary::{Arbitrary, Unstructured};
30538 let mut buf = [0u8; 1024];
30539 rng.fill_bytes(&mut buf);
30540 let mut unstructured = Unstructured::new(&buf);
30541 Self::arbitrary(&mut unstructured).unwrap_or_default()
30542 }
30543}
30544impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30545 fn default() -> Self {
30546 Self::DEFAULT.clone()
30547 }
30548}
30549impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30550 type Message = MavMessage;
30551 const ID: u32 = 86u32;
30552 const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
30553 const EXTRA_CRC: u8 = 5u8;
30554 const ENCODED_LEN: usize = 53usize;
30555 fn deser(
30556 _version: MavlinkVersion,
30557 __input: &[u8],
30558 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30559 let avail_len = __input.len();
30560 let mut payload_buf = [0; Self::ENCODED_LEN];
30561 let mut buf = if avail_len < Self::ENCODED_LEN {
30562 payload_buf[0..avail_len].copy_from_slice(__input);
30563 Bytes::new(&payload_buf)
30564 } else {
30565 Bytes::new(__input)
30566 };
30567 let mut __struct = Self::default();
30568 __struct.time_boot_ms = buf.get_u32_le()?;
30569 __struct.lat_int = buf.get_i32_le()?;
30570 __struct.lon_int = buf.get_i32_le()?;
30571 __struct.alt = buf.get_f32_le()?;
30572 __struct.vx = buf.get_f32_le()?;
30573 __struct.vy = buf.get_f32_le()?;
30574 __struct.vz = buf.get_f32_le()?;
30575 __struct.afx = buf.get_f32_le()?;
30576 __struct.afy = buf.get_f32_le()?;
30577 __struct.afz = buf.get_f32_le()?;
30578 __struct.yaw = buf.get_f32_le()?;
30579 __struct.yaw_rate = buf.get_f32_le()?;
30580 let tmp = buf.get_u16_le()?;
30581 __struct.type_mask =
30582 PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30583 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30584 flag_type: "PositionTargetTypemask",
30585 value: tmp as u64,
30586 })?;
30587 __struct.target_system = buf.get_u8()?;
30588 __struct.target_component = buf.get_u8()?;
30589 let tmp = buf.get_u8()?;
30590 __struct.coordinate_frame =
30591 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30592 enum_type: "MavFrame",
30593 value: tmp as u64,
30594 })?;
30595 Ok(__struct)
30596 }
30597 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30598 let mut __tmp = BytesMut::new(bytes);
30599 #[allow(clippy::absurd_extreme_comparisons)]
30600 #[allow(unused_comparisons)]
30601 if __tmp.remaining() < Self::ENCODED_LEN {
30602 panic!(
30603 "buffer is too small (need {} bytes, but got {})",
30604 Self::ENCODED_LEN,
30605 __tmp.remaining(),
30606 )
30607 }
30608 __tmp.put_u32_le(self.time_boot_ms);
30609 __tmp.put_i32_le(self.lat_int);
30610 __tmp.put_i32_le(self.lon_int);
30611 __tmp.put_f32_le(self.alt);
30612 __tmp.put_f32_le(self.vx);
30613 __tmp.put_f32_le(self.vy);
30614 __tmp.put_f32_le(self.vz);
30615 __tmp.put_f32_le(self.afx);
30616 __tmp.put_f32_le(self.afy);
30617 __tmp.put_f32_le(self.afz);
30618 __tmp.put_f32_le(self.yaw);
30619 __tmp.put_f32_le(self.yaw_rate);
30620 __tmp.put_u16_le(self.type_mask.bits() as u16);
30621 __tmp.put_u8(self.target_system);
30622 __tmp.put_u8(self.target_component);
30623 __tmp.put_u8(self.coordinate_frame as u8);
30624 if matches!(version, MavlinkVersion::V2) {
30625 let len = __tmp.len();
30626 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30627 } else {
30628 __tmp.len()
30629 }
30630 }
30631}
30632#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
30633#[doc = ""]
30634#[doc = "ID: 84"]
30635#[derive(Debug, Clone, PartialEq)]
30636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30638#[cfg_attr(feature = "ts", derive(TS))]
30639#[cfg_attr(feature = "ts", ts(export))]
30640pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
30641 #[doc = "Timestamp (time since system boot)."]
30642 pub time_boot_ms: u32,
30643 #[doc = "X Position in NED frame"]
30644 pub x: f32,
30645 #[doc = "Y Position in NED frame"]
30646 pub y: f32,
30647 #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
30648 pub z: f32,
30649 #[doc = "X velocity in NED frame"]
30650 pub vx: f32,
30651 #[doc = "Y velocity in NED frame"]
30652 pub vy: f32,
30653 #[doc = "Z velocity in NED frame"]
30654 pub vz: f32,
30655 #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30656 pub afx: f32,
30657 #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30658 pub afy: f32,
30659 #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30660 pub afz: f32,
30661 #[doc = "yaw setpoint"]
30662 pub yaw: f32,
30663 #[doc = "yaw rate setpoint"]
30664 pub yaw_rate: f32,
30665 #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30666 pub type_mask: PositionTargetTypemask,
30667 #[doc = "System ID"]
30668 pub target_system: u8,
30669 #[doc = "Component ID"]
30670 pub target_component: u8,
30671 #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
30672 pub coordinate_frame: MavFrame,
30673}
30674impl SET_POSITION_TARGET_LOCAL_NED_DATA {
30675 pub const ENCODED_LEN: usize = 53usize;
30676 pub const DEFAULT: Self = Self {
30677 time_boot_ms: 0_u32,
30678 x: 0.0_f32,
30679 y: 0.0_f32,
30680 z: 0.0_f32,
30681 vx: 0.0_f32,
30682 vy: 0.0_f32,
30683 vz: 0.0_f32,
30684 afx: 0.0_f32,
30685 afy: 0.0_f32,
30686 afz: 0.0_f32,
30687 yaw: 0.0_f32,
30688 yaw_rate: 0.0_f32,
30689 type_mask: PositionTargetTypemask::DEFAULT,
30690 target_system: 0_u8,
30691 target_component: 0_u8,
30692 coordinate_frame: MavFrame::DEFAULT,
30693 };
30694 #[cfg(feature = "arbitrary")]
30695 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30696 use arbitrary::{Arbitrary, Unstructured};
30697 let mut buf = [0u8; 1024];
30698 rng.fill_bytes(&mut buf);
30699 let mut unstructured = Unstructured::new(&buf);
30700 Self::arbitrary(&mut unstructured).unwrap_or_default()
30701 }
30702}
30703impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
30704 fn default() -> Self {
30705 Self::DEFAULT.clone()
30706 }
30707}
30708impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
30709 type Message = MavMessage;
30710 const ID: u32 = 84u32;
30711 const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
30712 const EXTRA_CRC: u8 = 143u8;
30713 const ENCODED_LEN: usize = 53usize;
30714 fn deser(
30715 _version: MavlinkVersion,
30716 __input: &[u8],
30717 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30718 let avail_len = __input.len();
30719 let mut payload_buf = [0; Self::ENCODED_LEN];
30720 let mut buf = if avail_len < Self::ENCODED_LEN {
30721 payload_buf[0..avail_len].copy_from_slice(__input);
30722 Bytes::new(&payload_buf)
30723 } else {
30724 Bytes::new(__input)
30725 };
30726 let mut __struct = Self::default();
30727 __struct.time_boot_ms = buf.get_u32_le()?;
30728 __struct.x = buf.get_f32_le()?;
30729 __struct.y = buf.get_f32_le()?;
30730 __struct.z = buf.get_f32_le()?;
30731 __struct.vx = buf.get_f32_le()?;
30732 __struct.vy = buf.get_f32_le()?;
30733 __struct.vz = buf.get_f32_le()?;
30734 __struct.afx = buf.get_f32_le()?;
30735 __struct.afy = buf.get_f32_le()?;
30736 __struct.afz = buf.get_f32_le()?;
30737 __struct.yaw = buf.get_f32_le()?;
30738 __struct.yaw_rate = buf.get_f32_le()?;
30739 let tmp = buf.get_u16_le()?;
30740 __struct.type_mask =
30741 PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30742 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30743 flag_type: "PositionTargetTypemask",
30744 value: tmp as u64,
30745 })?;
30746 __struct.target_system = buf.get_u8()?;
30747 __struct.target_component = buf.get_u8()?;
30748 let tmp = buf.get_u8()?;
30749 __struct.coordinate_frame =
30750 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30751 enum_type: "MavFrame",
30752 value: tmp as u64,
30753 })?;
30754 Ok(__struct)
30755 }
30756 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30757 let mut __tmp = BytesMut::new(bytes);
30758 #[allow(clippy::absurd_extreme_comparisons)]
30759 #[allow(unused_comparisons)]
30760 if __tmp.remaining() < Self::ENCODED_LEN {
30761 panic!(
30762 "buffer is too small (need {} bytes, but got {})",
30763 Self::ENCODED_LEN,
30764 __tmp.remaining(),
30765 )
30766 }
30767 __tmp.put_u32_le(self.time_boot_ms);
30768 __tmp.put_f32_le(self.x);
30769 __tmp.put_f32_le(self.y);
30770 __tmp.put_f32_le(self.z);
30771 __tmp.put_f32_le(self.vx);
30772 __tmp.put_f32_le(self.vy);
30773 __tmp.put_f32_le(self.vz);
30774 __tmp.put_f32_le(self.afx);
30775 __tmp.put_f32_le(self.afy);
30776 __tmp.put_f32_le(self.afz);
30777 __tmp.put_f32_le(self.yaw);
30778 __tmp.put_f32_le(self.yaw_rate);
30779 __tmp.put_u16_le(self.type_mask.bits() as u16);
30780 __tmp.put_u8(self.target_system);
30781 __tmp.put_u8(self.target_component);
30782 __tmp.put_u8(self.coordinate_frame as u8);
30783 if matches!(version, MavlinkVersion::V2) {
30784 let len = __tmp.len();
30785 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30786 } else {
30787 __tmp.len()
30788 }
30789 }
30790}
30791#[doc = "Status of simulation environment, if used."]
30792#[doc = ""]
30793#[doc = "ID: 108"]
30794#[derive(Debug, Clone, PartialEq)]
30795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30797#[cfg_attr(feature = "ts", derive(TS))]
30798#[cfg_attr(feature = "ts", ts(export))]
30799pub struct SIM_STATE_DATA {
30800 #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
30801 pub q1: f32,
30802 #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
30803 pub q2: f32,
30804 #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
30805 pub q3: f32,
30806 #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
30807 pub q4: f32,
30808 #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
30809 pub roll: f32,
30810 #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
30811 pub pitch: f32,
30812 #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
30813 pub yaw: f32,
30814 #[doc = "X acceleration"]
30815 pub xacc: f32,
30816 #[doc = "Y acceleration"]
30817 pub yacc: f32,
30818 #[doc = "Z acceleration"]
30819 pub zacc: f32,
30820 #[doc = "Angular speed around X axis"]
30821 pub xgyro: f32,
30822 #[doc = "Angular speed around Y axis"]
30823 pub ygyro: f32,
30824 #[doc = "Angular speed around Z axis"]
30825 pub zgyro: f32,
30826 #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
30827 pub lat: f32,
30828 #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
30829 pub lon: f32,
30830 #[doc = "Altitude"]
30831 pub alt: f32,
30832 #[doc = "Horizontal position standard deviation"]
30833 pub std_dev_horz: f32,
30834 #[doc = "Vertical position standard deviation"]
30835 pub std_dev_vert: f32,
30836 #[doc = "True velocity in north direction in earth-fixed NED frame"]
30837 pub vn: f32,
30838 #[doc = "True velocity in east direction in earth-fixed NED frame"]
30839 pub ve: f32,
30840 #[doc = "True velocity in down direction in earth-fixed NED frame"]
30841 pub vd: f32,
30842 #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
30843 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30844 pub lat_int: i32,
30845 #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
30846 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30847 pub lon_int: i32,
30848}
30849impl SIM_STATE_DATA {
30850 pub const ENCODED_LEN: usize = 92usize;
30851 pub const DEFAULT: Self = Self {
30852 q1: 0.0_f32,
30853 q2: 0.0_f32,
30854 q3: 0.0_f32,
30855 q4: 0.0_f32,
30856 roll: 0.0_f32,
30857 pitch: 0.0_f32,
30858 yaw: 0.0_f32,
30859 xacc: 0.0_f32,
30860 yacc: 0.0_f32,
30861 zacc: 0.0_f32,
30862 xgyro: 0.0_f32,
30863 ygyro: 0.0_f32,
30864 zgyro: 0.0_f32,
30865 lat: 0.0_f32,
30866 lon: 0.0_f32,
30867 alt: 0.0_f32,
30868 std_dev_horz: 0.0_f32,
30869 std_dev_vert: 0.0_f32,
30870 vn: 0.0_f32,
30871 ve: 0.0_f32,
30872 vd: 0.0_f32,
30873 lat_int: 0_i32,
30874 lon_int: 0_i32,
30875 };
30876 #[cfg(feature = "arbitrary")]
30877 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30878 use arbitrary::{Arbitrary, Unstructured};
30879 let mut buf = [0u8; 1024];
30880 rng.fill_bytes(&mut buf);
30881 let mut unstructured = Unstructured::new(&buf);
30882 Self::arbitrary(&mut unstructured).unwrap_or_default()
30883 }
30884}
30885impl Default for SIM_STATE_DATA {
30886 fn default() -> Self {
30887 Self::DEFAULT.clone()
30888 }
30889}
30890impl MessageData for SIM_STATE_DATA {
30891 type Message = MavMessage;
30892 const ID: u32 = 108u32;
30893 const NAME: &'static str = "SIM_STATE";
30894 const EXTRA_CRC: u8 = 32u8;
30895 const ENCODED_LEN: usize = 92usize;
30896 fn deser(
30897 _version: MavlinkVersion,
30898 __input: &[u8],
30899 ) -> Result<Self, ::mavlink_core::error::ParserError> {
30900 let avail_len = __input.len();
30901 let mut payload_buf = [0; Self::ENCODED_LEN];
30902 let mut buf = if avail_len < Self::ENCODED_LEN {
30903 payload_buf[0..avail_len].copy_from_slice(__input);
30904 Bytes::new(&payload_buf)
30905 } else {
30906 Bytes::new(__input)
30907 };
30908 let mut __struct = Self::default();
30909 __struct.q1 = buf.get_f32_le()?;
30910 __struct.q2 = buf.get_f32_le()?;
30911 __struct.q3 = buf.get_f32_le()?;
30912 __struct.q4 = buf.get_f32_le()?;
30913 __struct.roll = buf.get_f32_le()?;
30914 __struct.pitch = buf.get_f32_le()?;
30915 __struct.yaw = buf.get_f32_le()?;
30916 __struct.xacc = buf.get_f32_le()?;
30917 __struct.yacc = buf.get_f32_le()?;
30918 __struct.zacc = buf.get_f32_le()?;
30919 __struct.xgyro = buf.get_f32_le()?;
30920 __struct.ygyro = buf.get_f32_le()?;
30921 __struct.zgyro = buf.get_f32_le()?;
30922 __struct.lat = buf.get_f32_le()?;
30923 __struct.lon = buf.get_f32_le()?;
30924 __struct.alt = buf.get_f32_le()?;
30925 __struct.std_dev_horz = buf.get_f32_le()?;
30926 __struct.std_dev_vert = buf.get_f32_le()?;
30927 __struct.vn = buf.get_f32_le()?;
30928 __struct.ve = buf.get_f32_le()?;
30929 __struct.vd = buf.get_f32_le()?;
30930 __struct.lat_int = buf.get_i32_le()?;
30931 __struct.lon_int = buf.get_i32_le()?;
30932 Ok(__struct)
30933 }
30934 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30935 let mut __tmp = BytesMut::new(bytes);
30936 #[allow(clippy::absurd_extreme_comparisons)]
30937 #[allow(unused_comparisons)]
30938 if __tmp.remaining() < Self::ENCODED_LEN {
30939 panic!(
30940 "buffer is too small (need {} bytes, but got {})",
30941 Self::ENCODED_LEN,
30942 __tmp.remaining(),
30943 )
30944 }
30945 __tmp.put_f32_le(self.q1);
30946 __tmp.put_f32_le(self.q2);
30947 __tmp.put_f32_le(self.q3);
30948 __tmp.put_f32_le(self.q4);
30949 __tmp.put_f32_le(self.roll);
30950 __tmp.put_f32_le(self.pitch);
30951 __tmp.put_f32_le(self.yaw);
30952 __tmp.put_f32_le(self.xacc);
30953 __tmp.put_f32_le(self.yacc);
30954 __tmp.put_f32_le(self.zacc);
30955 __tmp.put_f32_le(self.xgyro);
30956 __tmp.put_f32_le(self.ygyro);
30957 __tmp.put_f32_le(self.zgyro);
30958 __tmp.put_f32_le(self.lat);
30959 __tmp.put_f32_le(self.lon);
30960 __tmp.put_f32_le(self.alt);
30961 __tmp.put_f32_le(self.std_dev_horz);
30962 __tmp.put_f32_le(self.std_dev_vert);
30963 __tmp.put_f32_le(self.vn);
30964 __tmp.put_f32_le(self.ve);
30965 __tmp.put_f32_le(self.vd);
30966 if matches!(version, MavlinkVersion::V2) {
30967 __tmp.put_i32_le(self.lat_int);
30968 __tmp.put_i32_le(self.lon_int);
30969 let len = __tmp.len();
30970 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30971 } else {
30972 __tmp.len()
30973 }
30974 }
30975}
30976#[deprecated = " See `BATTERY_INFO` (Superseded since 2024-02)"]
30977#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
30978#[doc = ""]
30979#[doc = "ID: 370"]
30980#[derive(Debug, Clone, PartialEq)]
30981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30983#[cfg_attr(feature = "ts", derive(TS))]
30984#[cfg_attr(feature = "ts", ts(export))]
30985pub struct SMART_BATTERY_INFO_DATA {
30986 #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
30987 pub capacity_full_specification: i32,
30988 #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
30989 pub capacity_full: i32,
30990 #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
30991 pub cycle_count: u16,
30992 #[doc = "Battery weight. 0: field not provided."]
30993 pub weight: u16,
30994 #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
30995 pub discharge_minimum_voltage: u16,
30996 #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
30997 pub charging_minimum_voltage: u16,
30998 #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
30999 pub resting_minimum_voltage: u16,
31000 #[doc = "Battery ID"]
31001 pub id: u8,
31002 #[doc = "Function of the battery"]
31003 pub battery_function: MavBatteryFunction,
31004 #[doc = "Type (chemistry) of the battery"]
31005 pub mavtype: MavBatteryType,
31006 #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
31007 #[cfg_attr(feature = "ts", ts(type = "string"))]
31008 pub serial_number: CharArray<16>,
31009 #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
31010 #[cfg_attr(feature = "ts", ts(type = "string"))]
31011 pub device_name: CharArray<50>,
31012 #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
31013 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31014 pub charging_maximum_voltage: u16,
31015 #[doc = "Number of battery cells in series. 0: field not provided."]
31016 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31017 pub cells_in_series: u8,
31018 #[doc = "Maximum pack discharge current. 0: field not provided."]
31019 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31020 pub discharge_maximum_current: u32,
31021 #[doc = "Maximum pack discharge burst current. 0: field not provided."]
31022 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31023 pub discharge_maximum_burst_current: u32,
31024 #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
31025 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31026 #[cfg_attr(feature = "ts", ts(type = "string"))]
31027 pub manufacture_date: CharArray<11>,
31028}
31029impl SMART_BATTERY_INFO_DATA {
31030 pub const ENCODED_LEN: usize = 109usize;
31031 pub const DEFAULT: Self = Self {
31032 capacity_full_specification: 0_i32,
31033 capacity_full: 0_i32,
31034 cycle_count: 0_u16,
31035 weight: 0_u16,
31036 discharge_minimum_voltage: 0_u16,
31037 charging_minimum_voltage: 0_u16,
31038 resting_minimum_voltage: 0_u16,
31039 id: 0_u8,
31040 battery_function: MavBatteryFunction::DEFAULT,
31041 mavtype: MavBatteryType::DEFAULT,
31042 serial_number: CharArray::new([0_u8; 16usize]),
31043 device_name: CharArray::new([0_u8; 50usize]),
31044 charging_maximum_voltage: 0_u16,
31045 cells_in_series: 0_u8,
31046 discharge_maximum_current: 0_u32,
31047 discharge_maximum_burst_current: 0_u32,
31048 manufacture_date: CharArray::new([0_u8; 11usize]),
31049 };
31050 #[cfg(feature = "arbitrary")]
31051 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31052 use arbitrary::{Arbitrary, Unstructured};
31053 let mut buf = [0u8; 1024];
31054 rng.fill_bytes(&mut buf);
31055 let mut unstructured = Unstructured::new(&buf);
31056 Self::arbitrary(&mut unstructured).unwrap_or_default()
31057 }
31058}
31059impl Default for SMART_BATTERY_INFO_DATA {
31060 fn default() -> Self {
31061 Self::DEFAULT.clone()
31062 }
31063}
31064impl MessageData for SMART_BATTERY_INFO_DATA {
31065 type Message = MavMessage;
31066 const ID: u32 = 370u32;
31067 const NAME: &'static str = "SMART_BATTERY_INFO";
31068 const EXTRA_CRC: u8 = 75u8;
31069 const ENCODED_LEN: usize = 109usize;
31070 fn deser(
31071 _version: MavlinkVersion,
31072 __input: &[u8],
31073 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31074 let avail_len = __input.len();
31075 let mut payload_buf = [0; Self::ENCODED_LEN];
31076 let mut buf = if avail_len < Self::ENCODED_LEN {
31077 payload_buf[0..avail_len].copy_from_slice(__input);
31078 Bytes::new(&payload_buf)
31079 } else {
31080 Bytes::new(__input)
31081 };
31082 let mut __struct = Self::default();
31083 __struct.capacity_full_specification = buf.get_i32_le()?;
31084 __struct.capacity_full = buf.get_i32_le()?;
31085 __struct.cycle_count = buf.get_u16_le()?;
31086 __struct.weight = buf.get_u16_le()?;
31087 __struct.discharge_minimum_voltage = buf.get_u16_le()?;
31088 __struct.charging_minimum_voltage = buf.get_u16_le()?;
31089 __struct.resting_minimum_voltage = buf.get_u16_le()?;
31090 __struct.id = buf.get_u8()?;
31091 let tmp = buf.get_u8()?;
31092 __struct.battery_function =
31093 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31094 enum_type: "MavBatteryFunction",
31095 value: tmp as u64,
31096 })?;
31097 let tmp = buf.get_u8()?;
31098 __struct.mavtype =
31099 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31100 enum_type: "MavBatteryType",
31101 value: tmp as u64,
31102 })?;
31103 let mut tmp = [0_u8; 16usize];
31104 for v in &mut tmp {
31105 *v = buf.get_u8()?;
31106 }
31107 __struct.serial_number = CharArray::new(tmp);
31108 let mut tmp = [0_u8; 50usize];
31109 for v in &mut tmp {
31110 *v = buf.get_u8()?;
31111 }
31112 __struct.device_name = CharArray::new(tmp);
31113 __struct.charging_maximum_voltage = buf.get_u16_le()?;
31114 __struct.cells_in_series = buf.get_u8()?;
31115 __struct.discharge_maximum_current = buf.get_u32_le()?;
31116 __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
31117 let mut tmp = [0_u8; 11usize];
31118 for v in &mut tmp {
31119 *v = buf.get_u8()?;
31120 }
31121 __struct.manufacture_date = CharArray::new(tmp);
31122 Ok(__struct)
31123 }
31124 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31125 let mut __tmp = BytesMut::new(bytes);
31126 #[allow(clippy::absurd_extreme_comparisons)]
31127 #[allow(unused_comparisons)]
31128 if __tmp.remaining() < Self::ENCODED_LEN {
31129 panic!(
31130 "buffer is too small (need {} bytes, but got {})",
31131 Self::ENCODED_LEN,
31132 __tmp.remaining(),
31133 )
31134 }
31135 __tmp.put_i32_le(self.capacity_full_specification);
31136 __tmp.put_i32_le(self.capacity_full);
31137 __tmp.put_u16_le(self.cycle_count);
31138 __tmp.put_u16_le(self.weight);
31139 __tmp.put_u16_le(self.discharge_minimum_voltage);
31140 __tmp.put_u16_le(self.charging_minimum_voltage);
31141 __tmp.put_u16_le(self.resting_minimum_voltage);
31142 __tmp.put_u8(self.id);
31143 __tmp.put_u8(self.battery_function as u8);
31144 __tmp.put_u8(self.mavtype as u8);
31145 for val in &self.serial_number {
31146 __tmp.put_u8(*val);
31147 }
31148 for val in &self.device_name {
31149 __tmp.put_u8(*val);
31150 }
31151 if matches!(version, MavlinkVersion::V2) {
31152 __tmp.put_u16_le(self.charging_maximum_voltage);
31153 __tmp.put_u8(self.cells_in_series);
31154 __tmp.put_u32_le(self.discharge_maximum_current);
31155 __tmp.put_u32_le(self.discharge_maximum_burst_current);
31156 for val in &self.manufacture_date {
31157 __tmp.put_u8(*val);
31158 }
31159 let len = __tmp.len();
31160 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31161 } else {
31162 __tmp.len()
31163 }
31164 }
31165}
31166#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
31167#[doc = ""]
31168#[doc = "ID: 253"]
31169#[derive(Debug, Clone, PartialEq)]
31170#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31172#[cfg_attr(feature = "ts", derive(TS))]
31173#[cfg_attr(feature = "ts", ts(export))]
31174pub struct STATUSTEXT_DATA {
31175 #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
31176 pub severity: MavSeverity,
31177 #[doc = "Status text message, without null termination character. UTF-8 encoded."]
31178 #[cfg_attr(feature = "ts", ts(type = "string"))]
31179 pub text: CharArray<50>,
31180 #[doc = "Unique (opaque) identifier for this statustext message. May be used to reassemble a logical long-statustext message from a sequence of chunks. A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
31181 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31182 pub id: u16,
31183 #[doc = "This chunk's sequence number; indexing is from zero. Any null character in the text field is taken to mean this was the last chunk."]
31184 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31185 pub chunk_seq: u8,
31186}
31187impl STATUSTEXT_DATA {
31188 pub const ENCODED_LEN: usize = 54usize;
31189 pub const DEFAULT: Self = Self {
31190 severity: MavSeverity::DEFAULT,
31191 text: CharArray::new([0_u8; 50usize]),
31192 id: 0_u16,
31193 chunk_seq: 0_u8,
31194 };
31195 #[cfg(feature = "arbitrary")]
31196 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31197 use arbitrary::{Arbitrary, Unstructured};
31198 let mut buf = [0u8; 1024];
31199 rng.fill_bytes(&mut buf);
31200 let mut unstructured = Unstructured::new(&buf);
31201 Self::arbitrary(&mut unstructured).unwrap_or_default()
31202 }
31203}
31204impl Default for STATUSTEXT_DATA {
31205 fn default() -> Self {
31206 Self::DEFAULT.clone()
31207 }
31208}
31209impl MessageData for STATUSTEXT_DATA {
31210 type Message = MavMessage;
31211 const ID: u32 = 253u32;
31212 const NAME: &'static str = "STATUSTEXT";
31213 const EXTRA_CRC: u8 = 83u8;
31214 const ENCODED_LEN: usize = 54usize;
31215 fn deser(
31216 _version: MavlinkVersion,
31217 __input: &[u8],
31218 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31219 let avail_len = __input.len();
31220 let mut payload_buf = [0; Self::ENCODED_LEN];
31221 let mut buf = if avail_len < Self::ENCODED_LEN {
31222 payload_buf[0..avail_len].copy_from_slice(__input);
31223 Bytes::new(&payload_buf)
31224 } else {
31225 Bytes::new(__input)
31226 };
31227 let mut __struct = Self::default();
31228 let tmp = buf.get_u8()?;
31229 __struct.severity =
31230 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31231 enum_type: "MavSeverity",
31232 value: tmp as u64,
31233 })?;
31234 let mut tmp = [0_u8; 50usize];
31235 for v in &mut tmp {
31236 *v = buf.get_u8()?;
31237 }
31238 __struct.text = CharArray::new(tmp);
31239 __struct.id = buf.get_u16_le()?;
31240 __struct.chunk_seq = buf.get_u8()?;
31241 Ok(__struct)
31242 }
31243 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31244 let mut __tmp = BytesMut::new(bytes);
31245 #[allow(clippy::absurd_extreme_comparisons)]
31246 #[allow(unused_comparisons)]
31247 if __tmp.remaining() < Self::ENCODED_LEN {
31248 panic!(
31249 "buffer is too small (need {} bytes, but got {})",
31250 Self::ENCODED_LEN,
31251 __tmp.remaining(),
31252 )
31253 }
31254 __tmp.put_u8(self.severity as u8);
31255 for val in &self.text {
31256 __tmp.put_u8(*val);
31257 }
31258 if matches!(version, MavlinkVersion::V2) {
31259 __tmp.put_u16_le(self.id);
31260 __tmp.put_u8(self.chunk_seq);
31261 let len = __tmp.len();
31262 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31263 } else {
31264 __tmp.len()
31265 }
31266 }
31267}
31268#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
31269#[doc = ""]
31270#[doc = "ID: 261"]
31271#[derive(Debug, Clone, PartialEq)]
31272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31274#[cfg_attr(feature = "ts", derive(TS))]
31275#[cfg_attr(feature = "ts", ts(export))]
31276pub struct STORAGE_INFORMATION_DATA {
31277 #[doc = "Timestamp (time since system boot)."]
31278 pub time_boot_ms: u32,
31279 #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31280 pub total_capacity: f32,
31281 #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31282 pub used_capacity: f32,
31283 #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31284 pub available_capacity: f32,
31285 #[doc = "Read speed."]
31286 pub read_speed: f32,
31287 #[doc = "Write speed."]
31288 pub write_speed: f32,
31289 #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
31290 pub storage_id: u8,
31291 #[doc = "Number of storage devices"]
31292 pub storage_count: u8,
31293 #[doc = "Status of storage"]
31294 pub status: StorageStatus,
31295 #[doc = "Type of storage"]
31296 #[cfg_attr(feature = "serde", serde(default))]
31297 pub mavtype: StorageType,
31298 #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
31299 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31300 #[cfg_attr(feature = "ts", ts(type = "string"))]
31301 pub name: CharArray<32>,
31302 #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc. Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported). This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE. If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
31303 #[cfg_attr(feature = "serde", serde(default))]
31304 pub storage_usage: StorageUsageFlag,
31305}
31306impl STORAGE_INFORMATION_DATA {
31307 pub const ENCODED_LEN: usize = 61usize;
31308 pub const DEFAULT: Self = Self {
31309 time_boot_ms: 0_u32,
31310 total_capacity: 0.0_f32,
31311 used_capacity: 0.0_f32,
31312 available_capacity: 0.0_f32,
31313 read_speed: 0.0_f32,
31314 write_speed: 0.0_f32,
31315 storage_id: 0_u8,
31316 storage_count: 0_u8,
31317 status: StorageStatus::DEFAULT,
31318 mavtype: StorageType::DEFAULT,
31319 name: CharArray::new([0_u8; 32usize]),
31320 storage_usage: StorageUsageFlag::DEFAULT,
31321 };
31322 #[cfg(feature = "arbitrary")]
31323 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31324 use arbitrary::{Arbitrary, Unstructured};
31325 let mut buf = [0u8; 1024];
31326 rng.fill_bytes(&mut buf);
31327 let mut unstructured = Unstructured::new(&buf);
31328 Self::arbitrary(&mut unstructured).unwrap_or_default()
31329 }
31330}
31331impl Default for STORAGE_INFORMATION_DATA {
31332 fn default() -> Self {
31333 Self::DEFAULT.clone()
31334 }
31335}
31336impl MessageData for STORAGE_INFORMATION_DATA {
31337 type Message = MavMessage;
31338 const ID: u32 = 261u32;
31339 const NAME: &'static str = "STORAGE_INFORMATION";
31340 const EXTRA_CRC: u8 = 179u8;
31341 const ENCODED_LEN: usize = 61usize;
31342 fn deser(
31343 _version: MavlinkVersion,
31344 __input: &[u8],
31345 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31346 let avail_len = __input.len();
31347 let mut payload_buf = [0; Self::ENCODED_LEN];
31348 let mut buf = if avail_len < Self::ENCODED_LEN {
31349 payload_buf[0..avail_len].copy_from_slice(__input);
31350 Bytes::new(&payload_buf)
31351 } else {
31352 Bytes::new(__input)
31353 };
31354 let mut __struct = Self::default();
31355 __struct.time_boot_ms = buf.get_u32_le()?;
31356 __struct.total_capacity = buf.get_f32_le()?;
31357 __struct.used_capacity = buf.get_f32_le()?;
31358 __struct.available_capacity = buf.get_f32_le()?;
31359 __struct.read_speed = buf.get_f32_le()?;
31360 __struct.write_speed = buf.get_f32_le()?;
31361 __struct.storage_id = buf.get_u8()?;
31362 __struct.storage_count = buf.get_u8()?;
31363 let tmp = buf.get_u8()?;
31364 __struct.status =
31365 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31366 enum_type: "StorageStatus",
31367 value: tmp as u64,
31368 })?;
31369 let tmp = buf.get_u8()?;
31370 __struct.mavtype =
31371 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31372 enum_type: "StorageType",
31373 value: tmp as u64,
31374 })?;
31375 let mut tmp = [0_u8; 32usize];
31376 for v in &mut tmp {
31377 *v = buf.get_u8()?;
31378 }
31379 __struct.name = CharArray::new(tmp);
31380 let tmp = buf.get_u8()?;
31381 __struct.storage_usage = StorageUsageFlag::from_bits(
31382 tmp as <StorageUsageFlag as Flags>::Bits,
31383 )
31384 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31385 flag_type: "StorageUsageFlag",
31386 value: tmp as u64,
31387 })?;
31388 Ok(__struct)
31389 }
31390 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31391 let mut __tmp = BytesMut::new(bytes);
31392 #[allow(clippy::absurd_extreme_comparisons)]
31393 #[allow(unused_comparisons)]
31394 if __tmp.remaining() < Self::ENCODED_LEN {
31395 panic!(
31396 "buffer is too small (need {} bytes, but got {})",
31397 Self::ENCODED_LEN,
31398 __tmp.remaining(),
31399 )
31400 }
31401 __tmp.put_u32_le(self.time_boot_ms);
31402 __tmp.put_f32_le(self.total_capacity);
31403 __tmp.put_f32_le(self.used_capacity);
31404 __tmp.put_f32_le(self.available_capacity);
31405 __tmp.put_f32_le(self.read_speed);
31406 __tmp.put_f32_le(self.write_speed);
31407 __tmp.put_u8(self.storage_id);
31408 __tmp.put_u8(self.storage_count);
31409 __tmp.put_u8(self.status as u8);
31410 if matches!(version, MavlinkVersion::V2) {
31411 __tmp.put_u8(self.mavtype as u8);
31412 for val in &self.name {
31413 __tmp.put_u8(*val);
31414 }
31415 __tmp.put_u8(self.storage_usage.bits() as u8);
31416 let len = __tmp.len();
31417 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31418 } else {
31419 __tmp.len()
31420 }
31421 }
31422}
31423#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
31424#[doc = ""]
31425#[doc = "ID: 401"]
31426#[derive(Debug, Clone, PartialEq)]
31427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31429#[cfg_attr(feature = "ts", derive(TS))]
31430#[cfg_attr(feature = "ts", ts(export))]
31431pub struct SUPPORTED_TUNES_DATA {
31432 #[doc = "Bitfield of supported tune formats."]
31433 pub format: TuneFormat,
31434 #[doc = "System ID"]
31435 pub target_system: u8,
31436 #[doc = "Component ID"]
31437 pub target_component: u8,
31438}
31439impl SUPPORTED_TUNES_DATA {
31440 pub const ENCODED_LEN: usize = 6usize;
31441 pub const DEFAULT: Self = Self {
31442 format: TuneFormat::DEFAULT,
31443 target_system: 0_u8,
31444 target_component: 0_u8,
31445 };
31446 #[cfg(feature = "arbitrary")]
31447 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31448 use arbitrary::{Arbitrary, Unstructured};
31449 let mut buf = [0u8; 1024];
31450 rng.fill_bytes(&mut buf);
31451 let mut unstructured = Unstructured::new(&buf);
31452 Self::arbitrary(&mut unstructured).unwrap_or_default()
31453 }
31454}
31455impl Default for SUPPORTED_TUNES_DATA {
31456 fn default() -> Self {
31457 Self::DEFAULT.clone()
31458 }
31459}
31460impl MessageData for SUPPORTED_TUNES_DATA {
31461 type Message = MavMessage;
31462 const ID: u32 = 401u32;
31463 const NAME: &'static str = "SUPPORTED_TUNES";
31464 const EXTRA_CRC: u8 = 183u8;
31465 const ENCODED_LEN: usize = 6usize;
31466 fn deser(
31467 _version: MavlinkVersion,
31468 __input: &[u8],
31469 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31470 let avail_len = __input.len();
31471 let mut payload_buf = [0; Self::ENCODED_LEN];
31472 let mut buf = if avail_len < Self::ENCODED_LEN {
31473 payload_buf[0..avail_len].copy_from_slice(__input);
31474 Bytes::new(&payload_buf)
31475 } else {
31476 Bytes::new(__input)
31477 };
31478 let mut __struct = Self::default();
31479 let tmp = buf.get_u32_le()?;
31480 __struct.format = FromPrimitive::from_u32(tmp).ok_or(
31481 ::mavlink_core::error::ParserError::InvalidEnum {
31482 enum_type: "TuneFormat",
31483 value: tmp as u64,
31484 },
31485 )?;
31486 __struct.target_system = buf.get_u8()?;
31487 __struct.target_component = buf.get_u8()?;
31488 Ok(__struct)
31489 }
31490 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31491 let mut __tmp = BytesMut::new(bytes);
31492 #[allow(clippy::absurd_extreme_comparisons)]
31493 #[allow(unused_comparisons)]
31494 if __tmp.remaining() < Self::ENCODED_LEN {
31495 panic!(
31496 "buffer is too small (need {} bytes, but got {})",
31497 Self::ENCODED_LEN,
31498 __tmp.remaining(),
31499 )
31500 }
31501 __tmp.put_u32_le(self.format as u32);
31502 __tmp.put_u8(self.target_system);
31503 __tmp.put_u8(self.target_component);
31504 if matches!(version, MavlinkVersion::V2) {
31505 let len = __tmp.len();
31506 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31507 } else {
31508 __tmp.len()
31509 }
31510 }
31511}
31512#[doc = "The system time is the time of the sender's master clock. This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network. Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a system that indicates a more recent time. This allows more broadly accurate date stamping of logs, and so on. If precise time synchronization is needed then use TIMESYNC instead."]
31513#[doc = ""]
31514#[doc = "ID: 2"]
31515#[derive(Debug, Clone, PartialEq)]
31516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31518#[cfg_attr(feature = "ts", derive(TS))]
31519#[cfg_attr(feature = "ts", ts(export))]
31520pub struct SYSTEM_TIME_DATA {
31521 #[doc = "Timestamp (UNIX epoch time)."]
31522 pub time_unix_usec: u64,
31523 #[doc = "Timestamp (time since system boot)."]
31524 pub time_boot_ms: u32,
31525}
31526impl SYSTEM_TIME_DATA {
31527 pub const ENCODED_LEN: usize = 12usize;
31528 pub const DEFAULT: Self = Self {
31529 time_unix_usec: 0_u64,
31530 time_boot_ms: 0_u32,
31531 };
31532 #[cfg(feature = "arbitrary")]
31533 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31534 use arbitrary::{Arbitrary, Unstructured};
31535 let mut buf = [0u8; 1024];
31536 rng.fill_bytes(&mut buf);
31537 let mut unstructured = Unstructured::new(&buf);
31538 Self::arbitrary(&mut unstructured).unwrap_or_default()
31539 }
31540}
31541impl Default for SYSTEM_TIME_DATA {
31542 fn default() -> Self {
31543 Self::DEFAULT.clone()
31544 }
31545}
31546impl MessageData for SYSTEM_TIME_DATA {
31547 type Message = MavMessage;
31548 const ID: u32 = 2u32;
31549 const NAME: &'static str = "SYSTEM_TIME";
31550 const EXTRA_CRC: u8 = 137u8;
31551 const ENCODED_LEN: usize = 12usize;
31552 fn deser(
31553 _version: MavlinkVersion,
31554 __input: &[u8],
31555 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31556 let avail_len = __input.len();
31557 let mut payload_buf = [0; Self::ENCODED_LEN];
31558 let mut buf = if avail_len < Self::ENCODED_LEN {
31559 payload_buf[0..avail_len].copy_from_slice(__input);
31560 Bytes::new(&payload_buf)
31561 } else {
31562 Bytes::new(__input)
31563 };
31564 let mut __struct = Self::default();
31565 __struct.time_unix_usec = buf.get_u64_le()?;
31566 __struct.time_boot_ms = buf.get_u32_le()?;
31567 Ok(__struct)
31568 }
31569 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31570 let mut __tmp = BytesMut::new(bytes);
31571 #[allow(clippy::absurd_extreme_comparisons)]
31572 #[allow(unused_comparisons)]
31573 if __tmp.remaining() < Self::ENCODED_LEN {
31574 panic!(
31575 "buffer is too small (need {} bytes, but got {})",
31576 Self::ENCODED_LEN,
31577 __tmp.remaining(),
31578 )
31579 }
31580 __tmp.put_u64_le(self.time_unix_usec);
31581 __tmp.put_u32_le(self.time_boot_ms);
31582 if matches!(version, MavlinkVersion::V2) {
31583 let len = __tmp.len();
31584 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31585 } else {
31586 __tmp.len()
31587 }
31588 }
31589}
31590#[doc = "Sensor and subsystem status information. Provides a compact representation of sensor/subsystem status and a few other basic statistics."]
31591#[doc = ""]
31592#[doc = "ID: 1"]
31593#[derive(Debug, Clone, PartialEq)]
31594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31596#[cfg_attr(feature = "ts", derive(TS))]
31597#[cfg_attr(feature = "ts", ts(export))]
31598pub struct SYS_STATUS_DATA {
31599 #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31600 pub onboard_control_sensors_present: MavSysStatusSensor,
31601 #[doc = "Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled."]
31602 pub onboard_control_sensors_enabled: MavSysStatusSensor,
31603 #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31604 pub onboard_control_sensors_health: MavSysStatusSensor,
31605 #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
31606 pub load: u16,
31607 #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
31608 pub voltage_battery: u16,
31609 #[doc = "Battery current, -1: Current not sent by autopilot"]
31610 pub current_battery: i16,
31611 #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31612 pub drop_rate_comm: u16,
31613 #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31614 pub errors_comm: u16,
31615 #[doc = "Autopilot-specific errors"]
31616 pub errors_count1: u16,
31617 #[doc = "Autopilot-specific errors"]
31618 pub errors_count2: u16,
31619 #[doc = "Autopilot-specific errors"]
31620 pub errors_count3: u16,
31621 #[doc = "Autopilot-specific errors"]
31622 pub errors_count4: u16,
31623 #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
31624 pub battery_remaining: i8,
31625 #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31626 #[cfg_attr(feature = "serde", serde(default))]
31627 pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
31628 #[doc = "Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled."]
31629 #[cfg_attr(feature = "serde", serde(default))]
31630 pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
31631 #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31632 #[cfg_attr(feature = "serde", serde(default))]
31633 pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
31634}
31635impl SYS_STATUS_DATA {
31636 pub const ENCODED_LEN: usize = 43usize;
31637 pub const DEFAULT: Self = Self {
31638 onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
31639 onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
31640 onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
31641 load: 0_u16,
31642 voltage_battery: 0_u16,
31643 current_battery: 0_i16,
31644 drop_rate_comm: 0_u16,
31645 errors_comm: 0_u16,
31646 errors_count1: 0_u16,
31647 errors_count2: 0_u16,
31648 errors_count3: 0_u16,
31649 errors_count4: 0_u16,
31650 battery_remaining: 0_i8,
31651 onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
31652 onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
31653 onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
31654 };
31655 #[cfg(feature = "arbitrary")]
31656 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31657 use arbitrary::{Arbitrary, Unstructured};
31658 let mut buf = [0u8; 1024];
31659 rng.fill_bytes(&mut buf);
31660 let mut unstructured = Unstructured::new(&buf);
31661 Self::arbitrary(&mut unstructured).unwrap_or_default()
31662 }
31663}
31664impl Default for SYS_STATUS_DATA {
31665 fn default() -> Self {
31666 Self::DEFAULT.clone()
31667 }
31668}
31669impl MessageData for SYS_STATUS_DATA {
31670 type Message = MavMessage;
31671 const ID: u32 = 1u32;
31672 const NAME: &'static str = "SYS_STATUS";
31673 const EXTRA_CRC: u8 = 124u8;
31674 const ENCODED_LEN: usize = 43usize;
31675 fn deser(
31676 _version: MavlinkVersion,
31677 __input: &[u8],
31678 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31679 let avail_len = __input.len();
31680 let mut payload_buf = [0; Self::ENCODED_LEN];
31681 let mut buf = if avail_len < Self::ENCODED_LEN {
31682 payload_buf[0..avail_len].copy_from_slice(__input);
31683 Bytes::new(&payload_buf)
31684 } else {
31685 Bytes::new(__input)
31686 };
31687 let mut __struct = Self::default();
31688 let tmp = buf.get_u32_le()?;
31689 __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
31690 tmp as <MavSysStatusSensor as Flags>::Bits,
31691 )
31692 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31693 flag_type: "MavSysStatusSensor",
31694 value: tmp as u64,
31695 })?;
31696 let tmp = buf.get_u32_le()?;
31697 __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
31698 tmp as <MavSysStatusSensor as Flags>::Bits,
31699 )
31700 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31701 flag_type: "MavSysStatusSensor",
31702 value: tmp as u64,
31703 })?;
31704 let tmp = buf.get_u32_le()?;
31705 __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
31706 tmp as <MavSysStatusSensor as Flags>::Bits,
31707 )
31708 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31709 flag_type: "MavSysStatusSensor",
31710 value: tmp as u64,
31711 })?;
31712 __struct.load = buf.get_u16_le()?;
31713 __struct.voltage_battery = buf.get_u16_le()?;
31714 __struct.current_battery = buf.get_i16_le()?;
31715 __struct.drop_rate_comm = buf.get_u16_le()?;
31716 __struct.errors_comm = buf.get_u16_le()?;
31717 __struct.errors_count1 = buf.get_u16_le()?;
31718 __struct.errors_count2 = buf.get_u16_le()?;
31719 __struct.errors_count3 = buf.get_u16_le()?;
31720 __struct.errors_count4 = buf.get_u16_le()?;
31721 __struct.battery_remaining = buf.get_i8()?;
31722 let tmp = buf.get_u32_le()?;
31723 __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
31724 tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31725 )
31726 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31727 flag_type: "MavSysStatusSensorExtended",
31728 value: tmp as u64,
31729 })?;
31730 let tmp = buf.get_u32_le()?;
31731 __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
31732 tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31733 )
31734 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31735 flag_type: "MavSysStatusSensorExtended",
31736 value: tmp as u64,
31737 })?;
31738 let tmp = buf.get_u32_le()?;
31739 __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
31740 tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31741 )
31742 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31743 flag_type: "MavSysStatusSensorExtended",
31744 value: tmp as u64,
31745 })?;
31746 Ok(__struct)
31747 }
31748 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31749 let mut __tmp = BytesMut::new(bytes);
31750 #[allow(clippy::absurd_extreme_comparisons)]
31751 #[allow(unused_comparisons)]
31752 if __tmp.remaining() < Self::ENCODED_LEN {
31753 panic!(
31754 "buffer is too small (need {} bytes, but got {})",
31755 Self::ENCODED_LEN,
31756 __tmp.remaining(),
31757 )
31758 }
31759 __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
31760 __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
31761 __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
31762 __tmp.put_u16_le(self.load);
31763 __tmp.put_u16_le(self.voltage_battery);
31764 __tmp.put_i16_le(self.current_battery);
31765 __tmp.put_u16_le(self.drop_rate_comm);
31766 __tmp.put_u16_le(self.errors_comm);
31767 __tmp.put_u16_le(self.errors_count1);
31768 __tmp.put_u16_le(self.errors_count2);
31769 __tmp.put_u16_le(self.errors_count3);
31770 __tmp.put_u16_le(self.errors_count4);
31771 __tmp.put_i8(self.battery_remaining);
31772 if matches!(version, MavlinkVersion::V2) {
31773 __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
31774 __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
31775 __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
31776 let len = __tmp.len();
31777 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31778 } else {
31779 __tmp.len()
31780 }
31781 }
31782}
31783#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
31784#[doc = ""]
31785#[doc = "ID: 135"]
31786#[derive(Debug, Clone, PartialEq)]
31787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31789#[cfg_attr(feature = "ts", derive(TS))]
31790#[cfg_attr(feature = "ts", ts(export))]
31791pub struct TERRAIN_CHECK_DATA {
31792 #[doc = "Latitude"]
31793 pub lat: i32,
31794 #[doc = "Longitude"]
31795 pub lon: i32,
31796}
31797impl TERRAIN_CHECK_DATA {
31798 pub const ENCODED_LEN: usize = 8usize;
31799 pub const DEFAULT: Self = Self {
31800 lat: 0_i32,
31801 lon: 0_i32,
31802 };
31803 #[cfg(feature = "arbitrary")]
31804 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31805 use arbitrary::{Arbitrary, Unstructured};
31806 let mut buf = [0u8; 1024];
31807 rng.fill_bytes(&mut buf);
31808 let mut unstructured = Unstructured::new(&buf);
31809 Self::arbitrary(&mut unstructured).unwrap_or_default()
31810 }
31811}
31812impl Default for TERRAIN_CHECK_DATA {
31813 fn default() -> Self {
31814 Self::DEFAULT.clone()
31815 }
31816}
31817impl MessageData for TERRAIN_CHECK_DATA {
31818 type Message = MavMessage;
31819 const ID: u32 = 135u32;
31820 const NAME: &'static str = "TERRAIN_CHECK";
31821 const EXTRA_CRC: u8 = 203u8;
31822 const ENCODED_LEN: usize = 8usize;
31823 fn deser(
31824 _version: MavlinkVersion,
31825 __input: &[u8],
31826 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31827 let avail_len = __input.len();
31828 let mut payload_buf = [0; Self::ENCODED_LEN];
31829 let mut buf = if avail_len < Self::ENCODED_LEN {
31830 payload_buf[0..avail_len].copy_from_slice(__input);
31831 Bytes::new(&payload_buf)
31832 } else {
31833 Bytes::new(__input)
31834 };
31835 let mut __struct = Self::default();
31836 __struct.lat = buf.get_i32_le()?;
31837 __struct.lon = buf.get_i32_le()?;
31838 Ok(__struct)
31839 }
31840 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31841 let mut __tmp = BytesMut::new(bytes);
31842 #[allow(clippy::absurd_extreme_comparisons)]
31843 #[allow(unused_comparisons)]
31844 if __tmp.remaining() < Self::ENCODED_LEN {
31845 panic!(
31846 "buffer is too small (need {} bytes, but got {})",
31847 Self::ENCODED_LEN,
31848 __tmp.remaining(),
31849 )
31850 }
31851 __tmp.put_i32_le(self.lat);
31852 __tmp.put_i32_le(self.lon);
31853 if matches!(version, MavlinkVersion::V2) {
31854 let len = __tmp.len();
31855 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31856 } else {
31857 __tmp.len()
31858 }
31859 }
31860}
31861#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31862#[doc = ""]
31863#[doc = "ID: 134"]
31864#[derive(Debug, Clone, PartialEq)]
31865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31867#[cfg_attr(feature = "ts", derive(TS))]
31868#[cfg_attr(feature = "ts", ts(export))]
31869pub struct TERRAIN_DATA_DATA {
31870 #[doc = "Latitude of SW corner of first grid"]
31871 pub lat: i32,
31872 #[doc = "Longitude of SW corner of first grid"]
31873 pub lon: i32,
31874 #[doc = "Grid spacing"]
31875 pub grid_spacing: u16,
31876 #[doc = "Terrain data MSL"]
31877 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31878 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31879 pub data: [i16; 16],
31880 #[doc = "bit within the terrain request mask"]
31881 pub gridbit: u8,
31882}
31883impl TERRAIN_DATA_DATA {
31884 pub const ENCODED_LEN: usize = 43usize;
31885 pub const DEFAULT: Self = Self {
31886 lat: 0_i32,
31887 lon: 0_i32,
31888 grid_spacing: 0_u16,
31889 data: [0_i16; 16usize],
31890 gridbit: 0_u8,
31891 };
31892 #[cfg(feature = "arbitrary")]
31893 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31894 use arbitrary::{Arbitrary, Unstructured};
31895 let mut buf = [0u8; 1024];
31896 rng.fill_bytes(&mut buf);
31897 let mut unstructured = Unstructured::new(&buf);
31898 Self::arbitrary(&mut unstructured).unwrap_or_default()
31899 }
31900}
31901impl Default for TERRAIN_DATA_DATA {
31902 fn default() -> Self {
31903 Self::DEFAULT.clone()
31904 }
31905}
31906impl MessageData for TERRAIN_DATA_DATA {
31907 type Message = MavMessage;
31908 const ID: u32 = 134u32;
31909 const NAME: &'static str = "TERRAIN_DATA";
31910 const EXTRA_CRC: u8 = 229u8;
31911 const ENCODED_LEN: usize = 43usize;
31912 fn deser(
31913 _version: MavlinkVersion,
31914 __input: &[u8],
31915 ) -> Result<Self, ::mavlink_core::error::ParserError> {
31916 let avail_len = __input.len();
31917 let mut payload_buf = [0; Self::ENCODED_LEN];
31918 let mut buf = if avail_len < Self::ENCODED_LEN {
31919 payload_buf[0..avail_len].copy_from_slice(__input);
31920 Bytes::new(&payload_buf)
31921 } else {
31922 Bytes::new(__input)
31923 };
31924 let mut __struct = Self::default();
31925 __struct.lat = buf.get_i32_le()?;
31926 __struct.lon = buf.get_i32_le()?;
31927 __struct.grid_spacing = buf.get_u16_le()?;
31928 for v in &mut __struct.data {
31929 let val = buf.get_i16_le()?;
31930 *v = val;
31931 }
31932 __struct.gridbit = buf.get_u8()?;
31933 Ok(__struct)
31934 }
31935 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31936 let mut __tmp = BytesMut::new(bytes);
31937 #[allow(clippy::absurd_extreme_comparisons)]
31938 #[allow(unused_comparisons)]
31939 if __tmp.remaining() < Self::ENCODED_LEN {
31940 panic!(
31941 "buffer is too small (need {} bytes, but got {})",
31942 Self::ENCODED_LEN,
31943 __tmp.remaining(),
31944 )
31945 }
31946 __tmp.put_i32_le(self.lat);
31947 __tmp.put_i32_le(self.lon);
31948 __tmp.put_u16_le(self.grid_spacing);
31949 for val in &self.data {
31950 __tmp.put_i16_le(*val);
31951 }
31952 __tmp.put_u8(self.gridbit);
31953 if matches!(version, MavlinkVersion::V2) {
31954 let len = __tmp.len();
31955 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31956 } else {
31957 __tmp.len()
31958 }
31959 }
31960}
31961#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31962#[doc = ""]
31963#[doc = "ID: 136"]
31964#[derive(Debug, Clone, PartialEq)]
31965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31966#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31967#[cfg_attr(feature = "ts", derive(TS))]
31968#[cfg_attr(feature = "ts", ts(export))]
31969pub struct TERRAIN_REPORT_DATA {
31970 #[doc = "Latitude"]
31971 pub lat: i32,
31972 #[doc = "Longitude"]
31973 pub lon: i32,
31974 #[doc = "Terrain height MSL"]
31975 pub terrain_height: f32,
31976 #[doc = "Current vehicle height above lat/lon terrain height"]
31977 pub current_height: f32,
31978 #[doc = "grid spacing (zero if terrain at this location unavailable)"]
31979 pub spacing: u16,
31980 #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
31981 pub pending: u16,
31982 #[doc = "Number of 4x4 terrain blocks in memory"]
31983 pub loaded: u16,
31984}
31985impl TERRAIN_REPORT_DATA {
31986 pub const ENCODED_LEN: usize = 22usize;
31987 pub const DEFAULT: Self = Self {
31988 lat: 0_i32,
31989 lon: 0_i32,
31990 terrain_height: 0.0_f32,
31991 current_height: 0.0_f32,
31992 spacing: 0_u16,
31993 pending: 0_u16,
31994 loaded: 0_u16,
31995 };
31996 #[cfg(feature = "arbitrary")]
31997 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31998 use arbitrary::{Arbitrary, Unstructured};
31999 let mut buf = [0u8; 1024];
32000 rng.fill_bytes(&mut buf);
32001 let mut unstructured = Unstructured::new(&buf);
32002 Self::arbitrary(&mut unstructured).unwrap_or_default()
32003 }
32004}
32005impl Default for TERRAIN_REPORT_DATA {
32006 fn default() -> Self {
32007 Self::DEFAULT.clone()
32008 }
32009}
32010impl MessageData for TERRAIN_REPORT_DATA {
32011 type Message = MavMessage;
32012 const ID: u32 = 136u32;
32013 const NAME: &'static str = "TERRAIN_REPORT";
32014 const EXTRA_CRC: u8 = 1u8;
32015 const ENCODED_LEN: usize = 22usize;
32016 fn deser(
32017 _version: MavlinkVersion,
32018 __input: &[u8],
32019 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32020 let avail_len = __input.len();
32021 let mut payload_buf = [0; Self::ENCODED_LEN];
32022 let mut buf = if avail_len < Self::ENCODED_LEN {
32023 payload_buf[0..avail_len].copy_from_slice(__input);
32024 Bytes::new(&payload_buf)
32025 } else {
32026 Bytes::new(__input)
32027 };
32028 let mut __struct = Self::default();
32029 __struct.lat = buf.get_i32_le()?;
32030 __struct.lon = buf.get_i32_le()?;
32031 __struct.terrain_height = buf.get_f32_le()?;
32032 __struct.current_height = buf.get_f32_le()?;
32033 __struct.spacing = buf.get_u16_le()?;
32034 __struct.pending = buf.get_u16_le()?;
32035 __struct.loaded = buf.get_u16_le()?;
32036 Ok(__struct)
32037 }
32038 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32039 let mut __tmp = BytesMut::new(bytes);
32040 #[allow(clippy::absurd_extreme_comparisons)]
32041 #[allow(unused_comparisons)]
32042 if __tmp.remaining() < Self::ENCODED_LEN {
32043 panic!(
32044 "buffer is too small (need {} bytes, but got {})",
32045 Self::ENCODED_LEN,
32046 __tmp.remaining(),
32047 )
32048 }
32049 __tmp.put_i32_le(self.lat);
32050 __tmp.put_i32_le(self.lon);
32051 __tmp.put_f32_le(self.terrain_height);
32052 __tmp.put_f32_le(self.current_height);
32053 __tmp.put_u16_le(self.spacing);
32054 __tmp.put_u16_le(self.pending);
32055 __tmp.put_u16_le(self.loaded);
32056 if matches!(version, MavlinkVersion::V2) {
32057 let len = __tmp.len();
32058 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32059 } else {
32060 __tmp.len()
32061 }
32062 }
32063}
32064#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32065#[doc = ""]
32066#[doc = "ID: 133"]
32067#[derive(Debug, Clone, PartialEq)]
32068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32070#[cfg_attr(feature = "ts", derive(TS))]
32071#[cfg_attr(feature = "ts", ts(export))]
32072pub struct TERRAIN_REQUEST_DATA {
32073 #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
32074 pub mask: u64,
32075 #[doc = "Latitude of SW corner of first grid"]
32076 pub lat: i32,
32077 #[doc = "Longitude of SW corner of first grid"]
32078 pub lon: i32,
32079 #[doc = "Grid spacing"]
32080 pub grid_spacing: u16,
32081}
32082impl TERRAIN_REQUEST_DATA {
32083 pub const ENCODED_LEN: usize = 18usize;
32084 pub const DEFAULT: Self = Self {
32085 mask: 0_u64,
32086 lat: 0_i32,
32087 lon: 0_i32,
32088 grid_spacing: 0_u16,
32089 };
32090 #[cfg(feature = "arbitrary")]
32091 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32092 use arbitrary::{Arbitrary, Unstructured};
32093 let mut buf = [0u8; 1024];
32094 rng.fill_bytes(&mut buf);
32095 let mut unstructured = Unstructured::new(&buf);
32096 Self::arbitrary(&mut unstructured).unwrap_or_default()
32097 }
32098}
32099impl Default for TERRAIN_REQUEST_DATA {
32100 fn default() -> Self {
32101 Self::DEFAULT.clone()
32102 }
32103}
32104impl MessageData for TERRAIN_REQUEST_DATA {
32105 type Message = MavMessage;
32106 const ID: u32 = 133u32;
32107 const NAME: &'static str = "TERRAIN_REQUEST";
32108 const EXTRA_CRC: u8 = 6u8;
32109 const ENCODED_LEN: usize = 18usize;
32110 fn deser(
32111 _version: MavlinkVersion,
32112 __input: &[u8],
32113 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32114 let avail_len = __input.len();
32115 let mut payload_buf = [0; Self::ENCODED_LEN];
32116 let mut buf = if avail_len < Self::ENCODED_LEN {
32117 payload_buf[0..avail_len].copy_from_slice(__input);
32118 Bytes::new(&payload_buf)
32119 } else {
32120 Bytes::new(__input)
32121 };
32122 let mut __struct = Self::default();
32123 __struct.mask = buf.get_u64_le()?;
32124 __struct.lat = buf.get_i32_le()?;
32125 __struct.lon = buf.get_i32_le()?;
32126 __struct.grid_spacing = buf.get_u16_le()?;
32127 Ok(__struct)
32128 }
32129 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32130 let mut __tmp = BytesMut::new(bytes);
32131 #[allow(clippy::absurd_extreme_comparisons)]
32132 #[allow(unused_comparisons)]
32133 if __tmp.remaining() < Self::ENCODED_LEN {
32134 panic!(
32135 "buffer is too small (need {} bytes, but got {})",
32136 Self::ENCODED_LEN,
32137 __tmp.remaining(),
32138 )
32139 }
32140 __tmp.put_u64_le(self.mask);
32141 __tmp.put_i32_le(self.lat);
32142 __tmp.put_i32_le(self.lon);
32143 __tmp.put_u16_le(self.grid_spacing);
32144 if matches!(version, MavlinkVersion::V2) {
32145 let len = __tmp.len();
32146 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32147 } else {
32148 __tmp.len()
32149 }
32150 }
32151}
32152#[doc = "Time synchronization message. The message is used for both timesync requests and responses. The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component. The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request. Systems can determine if they are receiving a request or response based on the value of `tc`. If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requester may report an error. Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used). The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset. See also: <https://mavlink.io/en/services/timesync.html>."]
32153#[doc = ""]
32154#[doc = "ID: 111"]
32155#[derive(Debug, Clone, PartialEq)]
32156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32158#[cfg_attr(feature = "ts", derive(TS))]
32159#[cfg_attr(feature = "ts", ts(export))]
32160pub struct TIMESYNC_DATA {
32161 #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
32162 pub tc1: i64,
32163 #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
32164 pub ts1: i64,
32165 #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
32166 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32167 pub target_system: u8,
32168 #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
32169 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32170 pub target_component: u8,
32171}
32172impl TIMESYNC_DATA {
32173 pub const ENCODED_LEN: usize = 18usize;
32174 pub const DEFAULT: Self = Self {
32175 tc1: 0_i64,
32176 ts1: 0_i64,
32177 target_system: 0_u8,
32178 target_component: 0_u8,
32179 };
32180 #[cfg(feature = "arbitrary")]
32181 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32182 use arbitrary::{Arbitrary, Unstructured};
32183 let mut buf = [0u8; 1024];
32184 rng.fill_bytes(&mut buf);
32185 let mut unstructured = Unstructured::new(&buf);
32186 Self::arbitrary(&mut unstructured).unwrap_or_default()
32187 }
32188}
32189impl Default for TIMESYNC_DATA {
32190 fn default() -> Self {
32191 Self::DEFAULT.clone()
32192 }
32193}
32194impl MessageData for TIMESYNC_DATA {
32195 type Message = MavMessage;
32196 const ID: u32 = 111u32;
32197 const NAME: &'static str = "TIMESYNC";
32198 const EXTRA_CRC: u8 = 34u8;
32199 const ENCODED_LEN: usize = 18usize;
32200 fn deser(
32201 _version: MavlinkVersion,
32202 __input: &[u8],
32203 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32204 let avail_len = __input.len();
32205 let mut payload_buf = [0; Self::ENCODED_LEN];
32206 let mut buf = if avail_len < Self::ENCODED_LEN {
32207 payload_buf[0..avail_len].copy_from_slice(__input);
32208 Bytes::new(&payload_buf)
32209 } else {
32210 Bytes::new(__input)
32211 };
32212 let mut __struct = Self::default();
32213 __struct.tc1 = buf.get_i64_le()?;
32214 __struct.ts1 = buf.get_i64_le()?;
32215 __struct.target_system = buf.get_u8()?;
32216 __struct.target_component = buf.get_u8()?;
32217 Ok(__struct)
32218 }
32219 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32220 let mut __tmp = BytesMut::new(bytes);
32221 #[allow(clippy::absurd_extreme_comparisons)]
32222 #[allow(unused_comparisons)]
32223 if __tmp.remaining() < Self::ENCODED_LEN {
32224 panic!(
32225 "buffer is too small (need {} bytes, but got {})",
32226 Self::ENCODED_LEN,
32227 __tmp.remaining(),
32228 )
32229 }
32230 __tmp.put_i64_le(self.tc1);
32231 __tmp.put_i64_le(self.ts1);
32232 if matches!(version, MavlinkVersion::V2) {
32233 __tmp.put_u8(self.target_system);
32234 __tmp.put_u8(self.target_component);
32235 let len = __tmp.len();
32236 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32237 } else {
32238 __tmp.len()
32239 }
32240 }
32241}
32242#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
32243#[doc = ""]
32244#[doc = "ID: 380"]
32245#[derive(Debug, Clone, PartialEq)]
32246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32248#[cfg_attr(feature = "ts", derive(TS))]
32249#[cfg_attr(feature = "ts", ts(export))]
32250pub struct TIME_ESTIMATE_TO_TARGET_DATA {
32251 #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
32252 pub safe_return: i32,
32253 #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
32254 pub land: i32,
32255 #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
32256 pub mission_next_item: i32,
32257 #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
32258 pub mission_end: i32,
32259 #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
32260 pub commanded_action: i32,
32261}
32262impl TIME_ESTIMATE_TO_TARGET_DATA {
32263 pub const ENCODED_LEN: usize = 20usize;
32264 pub const DEFAULT: Self = Self {
32265 safe_return: 0_i32,
32266 land: 0_i32,
32267 mission_next_item: 0_i32,
32268 mission_end: 0_i32,
32269 commanded_action: 0_i32,
32270 };
32271 #[cfg(feature = "arbitrary")]
32272 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32273 use arbitrary::{Arbitrary, Unstructured};
32274 let mut buf = [0u8; 1024];
32275 rng.fill_bytes(&mut buf);
32276 let mut unstructured = Unstructured::new(&buf);
32277 Self::arbitrary(&mut unstructured).unwrap_or_default()
32278 }
32279}
32280impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
32281 fn default() -> Self {
32282 Self::DEFAULT.clone()
32283 }
32284}
32285impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
32286 type Message = MavMessage;
32287 const ID: u32 = 380u32;
32288 const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
32289 const EXTRA_CRC: u8 = 232u8;
32290 const ENCODED_LEN: usize = 20usize;
32291 fn deser(
32292 _version: MavlinkVersion,
32293 __input: &[u8],
32294 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32295 let avail_len = __input.len();
32296 let mut payload_buf = [0; Self::ENCODED_LEN];
32297 let mut buf = if avail_len < Self::ENCODED_LEN {
32298 payload_buf[0..avail_len].copy_from_slice(__input);
32299 Bytes::new(&payload_buf)
32300 } else {
32301 Bytes::new(__input)
32302 };
32303 let mut __struct = Self::default();
32304 __struct.safe_return = buf.get_i32_le()?;
32305 __struct.land = buf.get_i32_le()?;
32306 __struct.mission_next_item = buf.get_i32_le()?;
32307 __struct.mission_end = buf.get_i32_le()?;
32308 __struct.commanded_action = buf.get_i32_le()?;
32309 Ok(__struct)
32310 }
32311 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32312 let mut __tmp = BytesMut::new(bytes);
32313 #[allow(clippy::absurd_extreme_comparisons)]
32314 #[allow(unused_comparisons)]
32315 if __tmp.remaining() < Self::ENCODED_LEN {
32316 panic!(
32317 "buffer is too small (need {} bytes, but got {})",
32318 Self::ENCODED_LEN,
32319 __tmp.remaining(),
32320 )
32321 }
32322 __tmp.put_i32_le(self.safe_return);
32323 __tmp.put_i32_le(self.land);
32324 __tmp.put_i32_le(self.mission_next_item);
32325 __tmp.put_i32_le(self.mission_end);
32326 __tmp.put_i32_le(self.commanded_action);
32327 if matches!(version, MavlinkVersion::V2) {
32328 let len = __tmp.len();
32329 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32330 } else {
32331 __tmp.len()
32332 }
32333 }
32334}
32335#[deprecated = "Implemented PX4 v1.11 to v1.14. Not used in current flight stacks. See `Nothing` (Deprecated since 2025-03)"]
32336#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
32337#[doc = ""]
32338#[doc = "ID: 333"]
32339#[derive(Debug, Clone, PartialEq)]
32340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32342#[cfg_attr(feature = "ts", derive(TS))]
32343#[cfg_attr(feature = "ts", ts(export))]
32344pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32345 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32346 pub time_usec: u64,
32347 #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
32348 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32349 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32350 pub pos_x: [f32; 5],
32351 #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
32352 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32353 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32354 pub pos_y: [f32; 5],
32355 #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
32356 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32357 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32358 pub pos_z: [f32; 5],
32359 #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
32360 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32361 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32362 pub delta: [f32; 5],
32363 #[doc = "Yaw. Set to NaN for unchanged"]
32364 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32365 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32366 pub pos_yaw: [f32; 5],
32367 #[doc = "Number of valid control points (up-to 5 points are possible)"]
32368 pub valid_points: u8,
32369}
32370impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32371 pub const ENCODED_LEN: usize = 109usize;
32372 pub const DEFAULT: Self = Self {
32373 time_usec: 0_u64,
32374 pos_x: [0.0_f32; 5usize],
32375 pos_y: [0.0_f32; 5usize],
32376 pos_z: [0.0_f32; 5usize],
32377 delta: [0.0_f32; 5usize],
32378 pos_yaw: [0.0_f32; 5usize],
32379 valid_points: 0_u8,
32380 };
32381 #[cfg(feature = "arbitrary")]
32382 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32383 use arbitrary::{Arbitrary, Unstructured};
32384 let mut buf = [0u8; 1024];
32385 rng.fill_bytes(&mut buf);
32386 let mut unstructured = Unstructured::new(&buf);
32387 Self::arbitrary(&mut unstructured).unwrap_or_default()
32388 }
32389}
32390impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32391 fn default() -> Self {
32392 Self::DEFAULT.clone()
32393 }
32394}
32395impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32396 type Message = MavMessage;
32397 const ID: u32 = 333u32;
32398 const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
32399 const EXTRA_CRC: u8 = 231u8;
32400 const ENCODED_LEN: usize = 109usize;
32401 fn deser(
32402 _version: MavlinkVersion,
32403 __input: &[u8],
32404 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32405 let avail_len = __input.len();
32406 let mut payload_buf = [0; Self::ENCODED_LEN];
32407 let mut buf = if avail_len < Self::ENCODED_LEN {
32408 payload_buf[0..avail_len].copy_from_slice(__input);
32409 Bytes::new(&payload_buf)
32410 } else {
32411 Bytes::new(__input)
32412 };
32413 let mut __struct = Self::default();
32414 __struct.time_usec = buf.get_u64_le()?;
32415 for v in &mut __struct.pos_x {
32416 let val = buf.get_f32_le()?;
32417 *v = val;
32418 }
32419 for v in &mut __struct.pos_y {
32420 let val = buf.get_f32_le()?;
32421 *v = val;
32422 }
32423 for v in &mut __struct.pos_z {
32424 let val = buf.get_f32_le()?;
32425 *v = val;
32426 }
32427 for v in &mut __struct.delta {
32428 let val = buf.get_f32_le()?;
32429 *v = val;
32430 }
32431 for v in &mut __struct.pos_yaw {
32432 let val = buf.get_f32_le()?;
32433 *v = val;
32434 }
32435 __struct.valid_points = buf.get_u8()?;
32436 Ok(__struct)
32437 }
32438 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32439 let mut __tmp = BytesMut::new(bytes);
32440 #[allow(clippy::absurd_extreme_comparisons)]
32441 #[allow(unused_comparisons)]
32442 if __tmp.remaining() < Self::ENCODED_LEN {
32443 panic!(
32444 "buffer is too small (need {} bytes, but got {})",
32445 Self::ENCODED_LEN,
32446 __tmp.remaining(),
32447 )
32448 }
32449 __tmp.put_u64_le(self.time_usec);
32450 for val in &self.pos_x {
32451 __tmp.put_f32_le(*val);
32452 }
32453 for val in &self.pos_y {
32454 __tmp.put_f32_le(*val);
32455 }
32456 for val in &self.pos_z {
32457 __tmp.put_f32_le(*val);
32458 }
32459 for val in &self.delta {
32460 __tmp.put_f32_le(*val);
32461 }
32462 for val in &self.pos_yaw {
32463 __tmp.put_f32_le(*val);
32464 }
32465 __tmp.put_u8(self.valid_points);
32466 if matches!(version, MavlinkVersion::V2) {
32467 let len = __tmp.len();
32468 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32469 } else {
32470 __tmp.len()
32471 }
32472 }
32473}
32474#[deprecated = "Implemented PX4 v1.11 to v1.14. Not used in current flight stacks. See `Nothing` (Deprecated since 2025-03)"]
32475#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32476#[doc = ""]
32477#[doc = "ID: 332"]
32478#[derive(Debug, Clone, PartialEq)]
32479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32481#[cfg_attr(feature = "ts", derive(TS))]
32482#[cfg_attr(feature = "ts", ts(export))]
32483pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32484 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32485 pub time_usec: u64,
32486 #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
32487 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32488 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32489 pub pos_x: [f32; 5],
32490 #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
32491 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32492 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32493 pub pos_y: [f32; 5],
32494 #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
32495 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32496 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32497 pub pos_z: [f32; 5],
32498 #[doc = "X-velocity of waypoint, set to NaN if not being used"]
32499 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32500 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32501 pub vel_x: [f32; 5],
32502 #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
32503 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32504 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32505 pub vel_y: [f32; 5],
32506 #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
32507 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32508 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32509 pub vel_z: [f32; 5],
32510 #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
32511 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32512 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32513 pub acc_x: [f32; 5],
32514 #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
32515 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32516 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32517 pub acc_y: [f32; 5],
32518 #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
32519 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32520 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32521 pub acc_z: [f32; 5],
32522 #[doc = "Yaw angle, set to NaN if not being used"]
32523 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32524 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32525 pub pos_yaw: [f32; 5],
32526 #[doc = "Yaw rate, set to NaN if not being used"]
32527 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32528 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32529 pub vel_yaw: [f32; 5],
32530 #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
32531 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32532 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32533 pub command: [u16; 5],
32534 #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
32535 pub valid_points: u8,
32536}
32537impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32538 pub const ENCODED_LEN: usize = 239usize;
32539 pub const DEFAULT: Self = Self {
32540 time_usec: 0_u64,
32541 pos_x: [0.0_f32; 5usize],
32542 pos_y: [0.0_f32; 5usize],
32543 pos_z: [0.0_f32; 5usize],
32544 vel_x: [0.0_f32; 5usize],
32545 vel_y: [0.0_f32; 5usize],
32546 vel_z: [0.0_f32; 5usize],
32547 acc_x: [0.0_f32; 5usize],
32548 acc_y: [0.0_f32; 5usize],
32549 acc_z: [0.0_f32; 5usize],
32550 pos_yaw: [0.0_f32; 5usize],
32551 vel_yaw: [0.0_f32; 5usize],
32552 command: [0_u16; 5usize],
32553 valid_points: 0_u8,
32554 };
32555 #[cfg(feature = "arbitrary")]
32556 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32557 use arbitrary::{Arbitrary, Unstructured};
32558 let mut buf = [0u8; 1024];
32559 rng.fill_bytes(&mut buf);
32560 let mut unstructured = Unstructured::new(&buf);
32561 Self::arbitrary(&mut unstructured).unwrap_or_default()
32562 }
32563}
32564impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32565 fn default() -> Self {
32566 Self::DEFAULT.clone()
32567 }
32568}
32569impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32570 type Message = MavMessage;
32571 const ID: u32 = 332u32;
32572 const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
32573 const EXTRA_CRC: u8 = 236u8;
32574 const ENCODED_LEN: usize = 239usize;
32575 fn deser(
32576 _version: MavlinkVersion,
32577 __input: &[u8],
32578 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32579 let avail_len = __input.len();
32580 let mut payload_buf = [0; Self::ENCODED_LEN];
32581 let mut buf = if avail_len < Self::ENCODED_LEN {
32582 payload_buf[0..avail_len].copy_from_slice(__input);
32583 Bytes::new(&payload_buf)
32584 } else {
32585 Bytes::new(__input)
32586 };
32587 let mut __struct = Self::default();
32588 __struct.time_usec = buf.get_u64_le()?;
32589 for v in &mut __struct.pos_x {
32590 let val = buf.get_f32_le()?;
32591 *v = val;
32592 }
32593 for v in &mut __struct.pos_y {
32594 let val = buf.get_f32_le()?;
32595 *v = val;
32596 }
32597 for v in &mut __struct.pos_z {
32598 let val = buf.get_f32_le()?;
32599 *v = val;
32600 }
32601 for v in &mut __struct.vel_x {
32602 let val = buf.get_f32_le()?;
32603 *v = val;
32604 }
32605 for v in &mut __struct.vel_y {
32606 let val = buf.get_f32_le()?;
32607 *v = val;
32608 }
32609 for v in &mut __struct.vel_z {
32610 let val = buf.get_f32_le()?;
32611 *v = val;
32612 }
32613 for v in &mut __struct.acc_x {
32614 let val = buf.get_f32_le()?;
32615 *v = val;
32616 }
32617 for v in &mut __struct.acc_y {
32618 let val = buf.get_f32_le()?;
32619 *v = val;
32620 }
32621 for v in &mut __struct.acc_z {
32622 let val = buf.get_f32_le()?;
32623 *v = val;
32624 }
32625 for v in &mut __struct.pos_yaw {
32626 let val = buf.get_f32_le()?;
32627 *v = val;
32628 }
32629 for v in &mut __struct.vel_yaw {
32630 let val = buf.get_f32_le()?;
32631 *v = val;
32632 }
32633 for v in &mut __struct.command {
32634 let val = buf.get_u16_le()?;
32635 *v = val;
32636 }
32637 __struct.valid_points = buf.get_u8()?;
32638 Ok(__struct)
32639 }
32640 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32641 let mut __tmp = BytesMut::new(bytes);
32642 #[allow(clippy::absurd_extreme_comparisons)]
32643 #[allow(unused_comparisons)]
32644 if __tmp.remaining() < Self::ENCODED_LEN {
32645 panic!(
32646 "buffer is too small (need {} bytes, but got {})",
32647 Self::ENCODED_LEN,
32648 __tmp.remaining(),
32649 )
32650 }
32651 __tmp.put_u64_le(self.time_usec);
32652 for val in &self.pos_x {
32653 __tmp.put_f32_le(*val);
32654 }
32655 for val in &self.pos_y {
32656 __tmp.put_f32_le(*val);
32657 }
32658 for val in &self.pos_z {
32659 __tmp.put_f32_le(*val);
32660 }
32661 for val in &self.vel_x {
32662 __tmp.put_f32_le(*val);
32663 }
32664 for val in &self.vel_y {
32665 __tmp.put_f32_le(*val);
32666 }
32667 for val in &self.vel_z {
32668 __tmp.put_f32_le(*val);
32669 }
32670 for val in &self.acc_x {
32671 __tmp.put_f32_le(*val);
32672 }
32673 for val in &self.acc_y {
32674 __tmp.put_f32_le(*val);
32675 }
32676 for val in &self.acc_z {
32677 __tmp.put_f32_le(*val);
32678 }
32679 for val in &self.pos_yaw {
32680 __tmp.put_f32_le(*val);
32681 }
32682 for val in &self.vel_yaw {
32683 __tmp.put_f32_le(*val);
32684 }
32685 for val in &self.command {
32686 __tmp.put_u16_le(*val);
32687 }
32688 __tmp.put_u8(self.valid_points);
32689 if matches!(version, MavlinkVersion::V2) {
32690 let len = __tmp.len();
32691 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32692 } else {
32693 __tmp.len()
32694 }
32695 }
32696}
32697#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32698#[doc = ""]
32699#[doc = "ID: 385"]
32700#[derive(Debug, Clone, PartialEq)]
32701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32703#[cfg_attr(feature = "ts", derive(TS))]
32704#[cfg_attr(feature = "ts", ts(export))]
32705pub struct TUNNEL_DATA {
32706 #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32707 pub payload_type: MavTunnelPayloadType,
32708 #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
32709 pub target_system: u8,
32710 #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32711 pub target_component: u8,
32712 #[doc = "Length of the data transported in payload"]
32713 pub payload_length: u8,
32714 #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32715 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32716 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32717 pub payload: [u8; 128],
32718}
32719impl TUNNEL_DATA {
32720 pub const ENCODED_LEN: usize = 133usize;
32721 pub const DEFAULT: Self = Self {
32722 payload_type: MavTunnelPayloadType::DEFAULT,
32723 target_system: 0_u8,
32724 target_component: 0_u8,
32725 payload_length: 0_u8,
32726 payload: [0_u8; 128usize],
32727 };
32728 #[cfg(feature = "arbitrary")]
32729 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32730 use arbitrary::{Arbitrary, Unstructured};
32731 let mut buf = [0u8; 1024];
32732 rng.fill_bytes(&mut buf);
32733 let mut unstructured = Unstructured::new(&buf);
32734 Self::arbitrary(&mut unstructured).unwrap_or_default()
32735 }
32736}
32737impl Default for TUNNEL_DATA {
32738 fn default() -> Self {
32739 Self::DEFAULT.clone()
32740 }
32741}
32742impl MessageData for TUNNEL_DATA {
32743 type Message = MavMessage;
32744 const ID: u32 = 385u32;
32745 const NAME: &'static str = "TUNNEL";
32746 const EXTRA_CRC: u8 = 147u8;
32747 const ENCODED_LEN: usize = 133usize;
32748 fn deser(
32749 _version: MavlinkVersion,
32750 __input: &[u8],
32751 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32752 let avail_len = __input.len();
32753 let mut payload_buf = [0; Self::ENCODED_LEN];
32754 let mut buf = if avail_len < Self::ENCODED_LEN {
32755 payload_buf[0..avail_len].copy_from_slice(__input);
32756 Bytes::new(&payload_buf)
32757 } else {
32758 Bytes::new(__input)
32759 };
32760 let mut __struct = Self::default();
32761 let tmp = buf.get_u16_le()?;
32762 __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32763 ::mavlink_core::error::ParserError::InvalidEnum {
32764 enum_type: "MavTunnelPayloadType",
32765 value: tmp as u64,
32766 },
32767 )?;
32768 __struct.target_system = buf.get_u8()?;
32769 __struct.target_component = buf.get_u8()?;
32770 __struct.payload_length = buf.get_u8()?;
32771 for v in &mut __struct.payload {
32772 let val = buf.get_u8()?;
32773 *v = val;
32774 }
32775 Ok(__struct)
32776 }
32777 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32778 let mut __tmp = BytesMut::new(bytes);
32779 #[allow(clippy::absurd_extreme_comparisons)]
32780 #[allow(unused_comparisons)]
32781 if __tmp.remaining() < Self::ENCODED_LEN {
32782 panic!(
32783 "buffer is too small (need {} bytes, but got {})",
32784 Self::ENCODED_LEN,
32785 __tmp.remaining(),
32786 )
32787 }
32788 __tmp.put_u16_le(self.payload_type as u16);
32789 __tmp.put_u8(self.target_system);
32790 __tmp.put_u8(self.target_component);
32791 __tmp.put_u8(self.payload_length);
32792 for val in &self.payload {
32793 __tmp.put_u8(*val);
32794 }
32795 if matches!(version, MavlinkVersion::V2) {
32796 let len = __tmp.len();
32797 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32798 } else {
32799 __tmp.len()
32800 }
32801 }
32802}
32803#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32804#[doc = ""]
32805#[doc = "ID: 311"]
32806#[derive(Debug, Clone, PartialEq)]
32807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32809#[cfg_attr(feature = "ts", derive(TS))]
32810#[cfg_attr(feature = "ts", ts(export))]
32811pub struct UAVCAN_NODE_INFO_DATA {
32812 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32813 pub time_usec: u64,
32814 #[doc = "Time since the start-up of the node."]
32815 pub uptime_sec: u32,
32816 #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
32817 pub sw_vcs_commit: u32,
32818 #[doc = "Node name string. For example, \"sapog.px4.io\"."]
32819 #[cfg_attr(feature = "ts", ts(type = "string"))]
32820 pub name: CharArray<80>,
32821 #[doc = "Hardware major version number."]
32822 pub hw_version_major: u8,
32823 #[doc = "Hardware minor version number."]
32824 pub hw_version_minor: u8,
32825 #[doc = "Hardware unique 128-bit ID."]
32826 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32827 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32828 pub hw_unique_id: [u8; 16],
32829 #[doc = "Software major version number."]
32830 pub sw_version_major: u8,
32831 #[doc = "Software minor version number."]
32832 pub sw_version_minor: u8,
32833}
32834impl UAVCAN_NODE_INFO_DATA {
32835 pub const ENCODED_LEN: usize = 116usize;
32836 pub const DEFAULT: Self = Self {
32837 time_usec: 0_u64,
32838 uptime_sec: 0_u32,
32839 sw_vcs_commit: 0_u32,
32840 name: CharArray::new([0_u8; 80usize]),
32841 hw_version_major: 0_u8,
32842 hw_version_minor: 0_u8,
32843 hw_unique_id: [0_u8; 16usize],
32844 sw_version_major: 0_u8,
32845 sw_version_minor: 0_u8,
32846 };
32847 #[cfg(feature = "arbitrary")]
32848 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32849 use arbitrary::{Arbitrary, Unstructured};
32850 let mut buf = [0u8; 1024];
32851 rng.fill_bytes(&mut buf);
32852 let mut unstructured = Unstructured::new(&buf);
32853 Self::arbitrary(&mut unstructured).unwrap_or_default()
32854 }
32855}
32856impl Default for UAVCAN_NODE_INFO_DATA {
32857 fn default() -> Self {
32858 Self::DEFAULT.clone()
32859 }
32860}
32861impl MessageData for UAVCAN_NODE_INFO_DATA {
32862 type Message = MavMessage;
32863 const ID: u32 = 311u32;
32864 const NAME: &'static str = "UAVCAN_NODE_INFO";
32865 const EXTRA_CRC: u8 = 95u8;
32866 const ENCODED_LEN: usize = 116usize;
32867 fn deser(
32868 _version: MavlinkVersion,
32869 __input: &[u8],
32870 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32871 let avail_len = __input.len();
32872 let mut payload_buf = [0; Self::ENCODED_LEN];
32873 let mut buf = if avail_len < Self::ENCODED_LEN {
32874 payload_buf[0..avail_len].copy_from_slice(__input);
32875 Bytes::new(&payload_buf)
32876 } else {
32877 Bytes::new(__input)
32878 };
32879 let mut __struct = Self::default();
32880 __struct.time_usec = buf.get_u64_le()?;
32881 __struct.uptime_sec = buf.get_u32_le()?;
32882 __struct.sw_vcs_commit = buf.get_u32_le()?;
32883 let mut tmp = [0_u8; 80usize];
32884 for v in &mut tmp {
32885 *v = buf.get_u8()?;
32886 }
32887 __struct.name = CharArray::new(tmp);
32888 __struct.hw_version_major = buf.get_u8()?;
32889 __struct.hw_version_minor = buf.get_u8()?;
32890 for v in &mut __struct.hw_unique_id {
32891 let val = buf.get_u8()?;
32892 *v = val;
32893 }
32894 __struct.sw_version_major = buf.get_u8()?;
32895 __struct.sw_version_minor = buf.get_u8()?;
32896 Ok(__struct)
32897 }
32898 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32899 let mut __tmp = BytesMut::new(bytes);
32900 #[allow(clippy::absurd_extreme_comparisons)]
32901 #[allow(unused_comparisons)]
32902 if __tmp.remaining() < Self::ENCODED_LEN {
32903 panic!(
32904 "buffer is too small (need {} bytes, but got {})",
32905 Self::ENCODED_LEN,
32906 __tmp.remaining(),
32907 )
32908 }
32909 __tmp.put_u64_le(self.time_usec);
32910 __tmp.put_u32_le(self.uptime_sec);
32911 __tmp.put_u32_le(self.sw_vcs_commit);
32912 for val in &self.name {
32913 __tmp.put_u8(*val);
32914 }
32915 __tmp.put_u8(self.hw_version_major);
32916 __tmp.put_u8(self.hw_version_minor);
32917 for val in &self.hw_unique_id {
32918 __tmp.put_u8(*val);
32919 }
32920 __tmp.put_u8(self.sw_version_major);
32921 __tmp.put_u8(self.sw_version_minor);
32922 if matches!(version, MavlinkVersion::V2) {
32923 let len = __tmp.len();
32924 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32925 } else {
32926 __tmp.len()
32927 }
32928 }
32929}
32930#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32931#[doc = ""]
32932#[doc = "ID: 310"]
32933#[derive(Debug, Clone, PartialEq)]
32934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32936#[cfg_attr(feature = "ts", derive(TS))]
32937#[cfg_attr(feature = "ts", ts(export))]
32938pub struct UAVCAN_NODE_STATUS_DATA {
32939 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32940 pub time_usec: u64,
32941 #[doc = "Time since the start-up of the node."]
32942 pub uptime_sec: u32,
32943 #[doc = "Vendor-specific status information."]
32944 pub vendor_specific_status_code: u16,
32945 #[doc = "Generalized node health status."]
32946 pub health: UavcanNodeHealth,
32947 #[doc = "Generalized operating mode."]
32948 pub mode: UavcanNodeMode,
32949 #[doc = "Not used currently."]
32950 pub sub_mode: u8,
32951}
32952impl UAVCAN_NODE_STATUS_DATA {
32953 pub const ENCODED_LEN: usize = 17usize;
32954 pub const DEFAULT: Self = Self {
32955 time_usec: 0_u64,
32956 uptime_sec: 0_u32,
32957 vendor_specific_status_code: 0_u16,
32958 health: UavcanNodeHealth::DEFAULT,
32959 mode: UavcanNodeMode::DEFAULT,
32960 sub_mode: 0_u8,
32961 };
32962 #[cfg(feature = "arbitrary")]
32963 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32964 use arbitrary::{Arbitrary, Unstructured};
32965 let mut buf = [0u8; 1024];
32966 rng.fill_bytes(&mut buf);
32967 let mut unstructured = Unstructured::new(&buf);
32968 Self::arbitrary(&mut unstructured).unwrap_or_default()
32969 }
32970}
32971impl Default for UAVCAN_NODE_STATUS_DATA {
32972 fn default() -> Self {
32973 Self::DEFAULT.clone()
32974 }
32975}
32976impl MessageData for UAVCAN_NODE_STATUS_DATA {
32977 type Message = MavMessage;
32978 const ID: u32 = 310u32;
32979 const NAME: &'static str = "UAVCAN_NODE_STATUS";
32980 const EXTRA_CRC: u8 = 28u8;
32981 const ENCODED_LEN: usize = 17usize;
32982 fn deser(
32983 _version: MavlinkVersion,
32984 __input: &[u8],
32985 ) -> Result<Self, ::mavlink_core::error::ParserError> {
32986 let avail_len = __input.len();
32987 let mut payload_buf = [0; Self::ENCODED_LEN];
32988 let mut buf = if avail_len < Self::ENCODED_LEN {
32989 payload_buf[0..avail_len].copy_from_slice(__input);
32990 Bytes::new(&payload_buf)
32991 } else {
32992 Bytes::new(__input)
32993 };
32994 let mut __struct = Self::default();
32995 __struct.time_usec = buf.get_u64_le()?;
32996 __struct.uptime_sec = buf.get_u32_le()?;
32997 __struct.vendor_specific_status_code = buf.get_u16_le()?;
32998 let tmp = buf.get_u8()?;
32999 __struct.health =
33000 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33001 enum_type: "UavcanNodeHealth",
33002 value: tmp as u64,
33003 })?;
33004 let tmp = buf.get_u8()?;
33005 __struct.mode =
33006 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33007 enum_type: "UavcanNodeMode",
33008 value: tmp as u64,
33009 })?;
33010 __struct.sub_mode = buf.get_u8()?;
33011 Ok(__struct)
33012 }
33013 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33014 let mut __tmp = BytesMut::new(bytes);
33015 #[allow(clippy::absurd_extreme_comparisons)]
33016 #[allow(unused_comparisons)]
33017 if __tmp.remaining() < Self::ENCODED_LEN {
33018 panic!(
33019 "buffer is too small (need {} bytes, but got {})",
33020 Self::ENCODED_LEN,
33021 __tmp.remaining(),
33022 )
33023 }
33024 __tmp.put_u64_le(self.time_usec);
33025 __tmp.put_u32_le(self.uptime_sec);
33026 __tmp.put_u16_le(self.vendor_specific_status_code);
33027 __tmp.put_u8(self.health as u8);
33028 __tmp.put_u8(self.mode as u8);
33029 __tmp.put_u8(self.sub_mode);
33030 if matches!(version, MavlinkVersion::V2) {
33031 let len = __tmp.len();
33032 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33033 } else {
33034 __tmp.len()
33035 }
33036 }
33037}
33038#[doc = "Request messages."]
33039#[doc = ""]
33040#[doc = "ID: 10006"]
33041#[derive(Debug, Clone, PartialEq)]
33042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33044#[cfg_attr(feature = "ts", derive(TS))]
33045#[cfg_attr(feature = "ts", ts(export))]
33046pub struct UAVIONIX_ADSB_GET_DATA {
33047 #[doc = "Message ID to request. Supports any message in this 10000-10099 range"]
33048 pub ReqMessageId: u32,
33049}
33050impl UAVIONIX_ADSB_GET_DATA {
33051 pub const ENCODED_LEN: usize = 4usize;
33052 pub const DEFAULT: Self = Self {
33053 ReqMessageId: 0_u32,
33054 };
33055 #[cfg(feature = "arbitrary")]
33056 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33057 use arbitrary::{Arbitrary, Unstructured};
33058 let mut buf = [0u8; 1024];
33059 rng.fill_bytes(&mut buf);
33060 let mut unstructured = Unstructured::new(&buf);
33061 Self::arbitrary(&mut unstructured).unwrap_or_default()
33062 }
33063}
33064impl Default for UAVIONIX_ADSB_GET_DATA {
33065 fn default() -> Self {
33066 Self::DEFAULT.clone()
33067 }
33068}
33069impl MessageData for UAVIONIX_ADSB_GET_DATA {
33070 type Message = MavMessage;
33071 const ID: u32 = 10006u32;
33072 const NAME: &'static str = "UAVIONIX_ADSB_GET";
33073 const EXTRA_CRC: u8 = 193u8;
33074 const ENCODED_LEN: usize = 4usize;
33075 fn deser(
33076 _version: MavlinkVersion,
33077 __input: &[u8],
33078 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33079 let avail_len = __input.len();
33080 let mut payload_buf = [0; Self::ENCODED_LEN];
33081 let mut buf = if avail_len < Self::ENCODED_LEN {
33082 payload_buf[0..avail_len].copy_from_slice(__input);
33083 Bytes::new(&payload_buf)
33084 } else {
33085 Bytes::new(__input)
33086 };
33087 let mut __struct = Self::default();
33088 __struct.ReqMessageId = buf.get_u32_le()?;
33089 Ok(__struct)
33090 }
33091 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33092 let mut __tmp = BytesMut::new(bytes);
33093 #[allow(clippy::absurd_extreme_comparisons)]
33094 #[allow(unused_comparisons)]
33095 if __tmp.remaining() < Self::ENCODED_LEN {
33096 panic!(
33097 "buffer is too small (need {} bytes, but got {})",
33098 Self::ENCODED_LEN,
33099 __tmp.remaining(),
33100 )
33101 }
33102 __tmp.put_u32_le(self.ReqMessageId);
33103 if matches!(version, MavlinkVersion::V2) {
33104 let len = __tmp.len();
33105 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33106 } else {
33107 __tmp.len()
33108 }
33109 }
33110}
33111#[doc = "Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter)."]
33112#[doc = ""]
33113#[doc = "ID: 10001"]
33114#[derive(Debug, Clone, PartialEq)]
33115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33117#[cfg_attr(feature = "ts", derive(TS))]
33118#[cfg_attr(feature = "ts", ts(export))]
33119pub struct UAVIONIX_ADSB_OUT_CFG_DATA {
33120 #[doc = "Vehicle address (24 bit)"]
33121 pub ICAO: u32,
33122 #[doc = "Aircraft stall speed in cm/s"]
33123 pub stallSpeed: u16,
33124 #[doc = "Vehicle identifier (8 characters, null terminated, valid characters are A-Z, 0-9, \" \" only)"]
33125 #[cfg_attr(feature = "ts", ts(type = "string"))]
33126 pub callsign: CharArray<9>,
33127 #[doc = "Transmitting vehicle type. See ADSB_EMITTER_TYPE enum"]
33128 pub emitterType: AdsbEmitterType,
33129 #[doc = "Aircraft length and width encoding (table 2-35 of DO-282B)"]
33130 pub aircraftSize: UavionixAdsbOutCfgAircraftSize,
33131 #[doc = "GPS antenna lateral offset (table 2-36 of DO-282B)"]
33132 pub gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat,
33133 #[doc = "GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B)"]
33134 pub gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon,
33135 #[doc = "ADS-B transponder receiver and transmit enable flags"]
33136 pub rfSelect: UavionixAdsbOutRfSelect,
33137}
33138impl UAVIONIX_ADSB_OUT_CFG_DATA {
33139 pub const ENCODED_LEN: usize = 20usize;
33140 pub const DEFAULT: Self = Self {
33141 ICAO: 0_u32,
33142 stallSpeed: 0_u16,
33143 callsign: CharArray::new([0_u8; 9usize]),
33144 emitterType: AdsbEmitterType::DEFAULT,
33145 aircraftSize: UavionixAdsbOutCfgAircraftSize::DEFAULT,
33146 gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat::DEFAULT,
33147 gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon::DEFAULT,
33148 rfSelect: UavionixAdsbOutRfSelect::DEFAULT,
33149 };
33150 #[cfg(feature = "arbitrary")]
33151 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33152 use arbitrary::{Arbitrary, Unstructured};
33153 let mut buf = [0u8; 1024];
33154 rng.fill_bytes(&mut buf);
33155 let mut unstructured = Unstructured::new(&buf);
33156 Self::arbitrary(&mut unstructured).unwrap_or_default()
33157 }
33158}
33159impl Default for UAVIONIX_ADSB_OUT_CFG_DATA {
33160 fn default() -> Self {
33161 Self::DEFAULT.clone()
33162 }
33163}
33164impl MessageData for UAVIONIX_ADSB_OUT_CFG_DATA {
33165 type Message = MavMessage;
33166 const ID: u32 = 10001u32;
33167 const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG";
33168 const EXTRA_CRC: u8 = 209u8;
33169 const ENCODED_LEN: usize = 20usize;
33170 fn deser(
33171 _version: MavlinkVersion,
33172 __input: &[u8],
33173 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33174 let avail_len = __input.len();
33175 let mut payload_buf = [0; Self::ENCODED_LEN];
33176 let mut buf = if avail_len < Self::ENCODED_LEN {
33177 payload_buf[0..avail_len].copy_from_slice(__input);
33178 Bytes::new(&payload_buf)
33179 } else {
33180 Bytes::new(__input)
33181 };
33182 let mut __struct = Self::default();
33183 __struct.ICAO = buf.get_u32_le()?;
33184 __struct.stallSpeed = buf.get_u16_le()?;
33185 let mut tmp = [0_u8; 9usize];
33186 for v in &mut tmp {
33187 *v = buf.get_u8()?;
33188 }
33189 __struct.callsign = CharArray::new(tmp);
33190 let tmp = buf.get_u8()?;
33191 __struct.emitterType =
33192 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33193 enum_type: "AdsbEmitterType",
33194 value: tmp as u64,
33195 })?;
33196 let tmp = buf.get_u8()?;
33197 __struct.aircraftSize =
33198 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33199 enum_type: "UavionixAdsbOutCfgAircraftSize",
33200 value: tmp as u64,
33201 })?;
33202 let tmp = buf.get_u8()?;
33203 __struct.gpsOffsetLat =
33204 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33205 enum_type: "UavionixAdsbOutCfgGpsOffsetLat",
33206 value: tmp as u64,
33207 })?;
33208 let tmp = buf.get_u8()?;
33209 __struct.gpsOffsetLon =
33210 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33211 enum_type: "UavionixAdsbOutCfgGpsOffsetLon",
33212 value: tmp as u64,
33213 })?;
33214 let tmp = buf.get_u8()?;
33215 __struct.rfSelect =
33216 UavionixAdsbOutRfSelect::from_bits(tmp as <UavionixAdsbOutRfSelect as Flags>::Bits)
33217 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33218 flag_type: "UavionixAdsbOutRfSelect",
33219 value: tmp as u64,
33220 })?;
33221 Ok(__struct)
33222 }
33223 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33224 let mut __tmp = BytesMut::new(bytes);
33225 #[allow(clippy::absurd_extreme_comparisons)]
33226 #[allow(unused_comparisons)]
33227 if __tmp.remaining() < Self::ENCODED_LEN {
33228 panic!(
33229 "buffer is too small (need {} bytes, but got {})",
33230 Self::ENCODED_LEN,
33231 __tmp.remaining(),
33232 )
33233 }
33234 __tmp.put_u32_le(self.ICAO);
33235 __tmp.put_u16_le(self.stallSpeed);
33236 for val in &self.callsign {
33237 __tmp.put_u8(*val);
33238 }
33239 __tmp.put_u8(self.emitterType as u8);
33240 __tmp.put_u8(self.aircraftSize as u8);
33241 __tmp.put_u8(self.gpsOffsetLat as u8);
33242 __tmp.put_u8(self.gpsOffsetLon as u8);
33243 __tmp.put_u8(self.rfSelect.bits() as u8);
33244 if matches!(version, MavlinkVersion::V2) {
33245 let len = __tmp.len();
33246 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33247 } else {
33248 __tmp.len()
33249 }
33250 }
33251}
33252#[doc = "Flight Identification for ADSB-Out vehicles."]
33253#[doc = ""]
33254#[doc = "ID: 10005"]
33255#[derive(Debug, Clone, PartialEq)]
33256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33258#[cfg_attr(feature = "ts", derive(TS))]
33259#[cfg_attr(feature = "ts", ts(export))]
33260pub struct UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
33261 #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated."]
33262 #[cfg_attr(feature = "ts", ts(type = "string"))]
33263 pub flight_id: CharArray<9>,
33264}
33265impl UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
33266 pub const ENCODED_LEN: usize = 9usize;
33267 pub const DEFAULT: Self = Self {
33268 flight_id: CharArray::new([0_u8; 9usize]),
33269 };
33270 #[cfg(feature = "arbitrary")]
33271 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33272 use arbitrary::{Arbitrary, Unstructured};
33273 let mut buf = [0u8; 1024];
33274 rng.fill_bytes(&mut buf);
33275 let mut unstructured = Unstructured::new(&buf);
33276 Self::arbitrary(&mut unstructured).unwrap_or_default()
33277 }
33278}
33279impl Default for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
33280 fn default() -> Self {
33281 Self::DEFAULT.clone()
33282 }
33283}
33284impl MessageData for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
33285 type Message = MavMessage;
33286 const ID: u32 = 10005u32;
33287 const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_FLIGHTID";
33288 const EXTRA_CRC: u8 = 103u8;
33289 const ENCODED_LEN: usize = 9usize;
33290 fn deser(
33291 _version: MavlinkVersion,
33292 __input: &[u8],
33293 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33294 let avail_len = __input.len();
33295 let mut payload_buf = [0; Self::ENCODED_LEN];
33296 let mut buf = if avail_len < Self::ENCODED_LEN {
33297 payload_buf[0..avail_len].copy_from_slice(__input);
33298 Bytes::new(&payload_buf)
33299 } else {
33300 Bytes::new(__input)
33301 };
33302 let mut __struct = Self::default();
33303 let mut tmp = [0_u8; 9usize];
33304 for v in &mut tmp {
33305 *v = buf.get_u8()?;
33306 }
33307 __struct.flight_id = CharArray::new(tmp);
33308 Ok(__struct)
33309 }
33310 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33311 let mut __tmp = BytesMut::new(bytes);
33312 #[allow(clippy::absurd_extreme_comparisons)]
33313 #[allow(unused_comparisons)]
33314 if __tmp.remaining() < Self::ENCODED_LEN {
33315 panic!(
33316 "buffer is too small (need {} bytes, but got {})",
33317 Self::ENCODED_LEN,
33318 __tmp.remaining(),
33319 )
33320 }
33321 for val in &self.flight_id {
33322 __tmp.put_u8(*val);
33323 }
33324 if matches!(version, MavlinkVersion::V2) {
33325 let len = __tmp.len();
33326 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33327 } else {
33328 __tmp.len()
33329 }
33330 }
33331}
33332#[doc = "Aircraft Registration."]
33333#[doc = ""]
33334#[doc = "ID: 10004"]
33335#[derive(Debug, Clone, PartialEq)]
33336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33338#[cfg_attr(feature = "ts", derive(TS))]
33339#[cfg_attr(feature = "ts", ts(export))]
33340pub struct UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
33341 #[doc = "Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. \"N8644B \". Trailing spaces (0x20) only. This is null-terminated."]
33342 #[cfg_attr(feature = "ts", ts(type = "string"))]
33343 pub registration: CharArray<9>,
33344}
33345impl UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
33346 pub const ENCODED_LEN: usize = 9usize;
33347 pub const DEFAULT: Self = Self {
33348 registration: CharArray::new([0_u8; 9usize]),
33349 };
33350 #[cfg(feature = "arbitrary")]
33351 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33352 use arbitrary::{Arbitrary, Unstructured};
33353 let mut buf = [0u8; 1024];
33354 rng.fill_bytes(&mut buf);
33355 let mut unstructured = Unstructured::new(&buf);
33356 Self::arbitrary(&mut unstructured).unwrap_or_default()
33357 }
33358}
33359impl Default for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
33360 fn default() -> Self {
33361 Self::DEFAULT.clone()
33362 }
33363}
33364impl MessageData for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
33365 type Message = MavMessage;
33366 const ID: u32 = 10004u32;
33367 const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_REGISTRATION";
33368 const EXTRA_CRC: u8 = 133u8;
33369 const ENCODED_LEN: usize = 9usize;
33370 fn deser(
33371 _version: MavlinkVersion,
33372 __input: &[u8],
33373 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33374 let avail_len = __input.len();
33375 let mut payload_buf = [0; Self::ENCODED_LEN];
33376 let mut buf = if avail_len < Self::ENCODED_LEN {
33377 payload_buf[0..avail_len].copy_from_slice(__input);
33378 Bytes::new(&payload_buf)
33379 } else {
33380 Bytes::new(__input)
33381 };
33382 let mut __struct = Self::default();
33383 let mut tmp = [0_u8; 9usize];
33384 for v in &mut tmp {
33385 *v = buf.get_u8()?;
33386 }
33387 __struct.registration = CharArray::new(tmp);
33388 Ok(__struct)
33389 }
33390 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33391 let mut __tmp = BytesMut::new(bytes);
33392 #[allow(clippy::absurd_extreme_comparisons)]
33393 #[allow(unused_comparisons)]
33394 if __tmp.remaining() < Self::ENCODED_LEN {
33395 panic!(
33396 "buffer is too small (need {} bytes, but got {})",
33397 Self::ENCODED_LEN,
33398 __tmp.remaining(),
33399 )
33400 }
33401 for val in &self.registration {
33402 __tmp.put_u8(*val);
33403 }
33404 if matches!(version, MavlinkVersion::V2) {
33405 let len = __tmp.len();
33406 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33407 } else {
33408 __tmp.len()
33409 }
33410 }
33411}
33412#[doc = "Control message with all data sent in UCP control message."]
33413#[doc = ""]
33414#[doc = "ID: 10007"]
33415#[derive(Debug, Clone, PartialEq)]
33416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33418#[cfg_attr(feature = "ts", derive(TS))]
33419#[cfg_attr(feature = "ts", ts(export))]
33420pub struct UAVIONIX_ADSB_OUT_CONTROL_DATA {
33421 #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
33422 pub baroAltMSL: i32,
33423 #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
33424 pub squawk: u16,
33425 #[doc = "ADS-B transponder control state flags"]
33426 pub state: UavionixAdsbOutControlState,
33427 #[doc = "Emergency status"]
33428 pub emergencyStatus: UavionixAdsbEmergencyStatus,
33429 #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
33430 #[cfg_attr(feature = "ts", ts(type = "string"))]
33431 pub flight_id: CharArray<8>,
33432 #[doc = "X-Bit enable (military transponders only)"]
33433 pub x_bit: UavionixAdsbXbit,
33434}
33435impl UAVIONIX_ADSB_OUT_CONTROL_DATA {
33436 pub const ENCODED_LEN: usize = 17usize;
33437 pub const DEFAULT: Self = Self {
33438 baroAltMSL: 0_i32,
33439 squawk: 0_u16,
33440 state: UavionixAdsbOutControlState::DEFAULT,
33441 emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
33442 flight_id: CharArray::new([0_u8; 8usize]),
33443 x_bit: UavionixAdsbXbit::DEFAULT,
33444 };
33445 #[cfg(feature = "arbitrary")]
33446 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33447 use arbitrary::{Arbitrary, Unstructured};
33448 let mut buf = [0u8; 1024];
33449 rng.fill_bytes(&mut buf);
33450 let mut unstructured = Unstructured::new(&buf);
33451 Self::arbitrary(&mut unstructured).unwrap_or_default()
33452 }
33453}
33454impl Default for UAVIONIX_ADSB_OUT_CONTROL_DATA {
33455 fn default() -> Self {
33456 Self::DEFAULT.clone()
33457 }
33458}
33459impl MessageData for UAVIONIX_ADSB_OUT_CONTROL_DATA {
33460 type Message = MavMessage;
33461 const ID: u32 = 10007u32;
33462 const NAME: &'static str = "UAVIONIX_ADSB_OUT_CONTROL";
33463 const EXTRA_CRC: u8 = 71u8;
33464 const ENCODED_LEN: usize = 17usize;
33465 fn deser(
33466 _version: MavlinkVersion,
33467 __input: &[u8],
33468 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33469 let avail_len = __input.len();
33470 let mut payload_buf = [0; Self::ENCODED_LEN];
33471 let mut buf = if avail_len < Self::ENCODED_LEN {
33472 payload_buf[0..avail_len].copy_from_slice(__input);
33473 Bytes::new(&payload_buf)
33474 } else {
33475 Bytes::new(__input)
33476 };
33477 let mut __struct = Self::default();
33478 __struct.baroAltMSL = buf.get_i32_le()?;
33479 __struct.squawk = buf.get_u16_le()?;
33480 let tmp = buf.get_u8()?;
33481 __struct.state = UavionixAdsbOutControlState::from_bits(
33482 tmp as <UavionixAdsbOutControlState as Flags>::Bits,
33483 )
33484 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33485 flag_type: "UavionixAdsbOutControlState",
33486 value: tmp as u64,
33487 })?;
33488 let tmp = buf.get_u8()?;
33489 __struct.emergencyStatus =
33490 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33491 enum_type: "UavionixAdsbEmergencyStatus",
33492 value: tmp as u64,
33493 })?;
33494 let mut tmp = [0_u8; 8usize];
33495 for v in &mut tmp {
33496 *v = buf.get_u8()?;
33497 }
33498 __struct.flight_id = CharArray::new(tmp);
33499 let tmp = buf.get_u8()?;
33500 __struct.x_bit = UavionixAdsbXbit::from_bits(tmp as <UavionixAdsbXbit as Flags>::Bits)
33501 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33502 flag_type: "UavionixAdsbXbit",
33503 value: tmp as u64,
33504 })?;
33505 Ok(__struct)
33506 }
33507 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33508 let mut __tmp = BytesMut::new(bytes);
33509 #[allow(clippy::absurd_extreme_comparisons)]
33510 #[allow(unused_comparisons)]
33511 if __tmp.remaining() < Self::ENCODED_LEN {
33512 panic!(
33513 "buffer is too small (need {} bytes, but got {})",
33514 Self::ENCODED_LEN,
33515 __tmp.remaining(),
33516 )
33517 }
33518 __tmp.put_i32_le(self.baroAltMSL);
33519 __tmp.put_u16_le(self.squawk);
33520 __tmp.put_u8(self.state.bits() as u8);
33521 __tmp.put_u8(self.emergencyStatus as u8);
33522 for val in &self.flight_id {
33523 __tmp.put_u8(*val);
33524 }
33525 __tmp.put_u8(self.x_bit.bits() as u8);
33526 if matches!(version, MavlinkVersion::V2) {
33527 let len = __tmp.len();
33528 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33529 } else {
33530 __tmp.len()
33531 }
33532 }
33533}
33534#[doc = "Dynamic data used to generate ADS-B out transponder data (send at 5Hz)."]
33535#[doc = ""]
33536#[doc = "ID: 10002"]
33537#[derive(Debug, Clone, PartialEq)]
33538#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33540#[cfg_attr(feature = "ts", derive(TS))]
33541#[cfg_attr(feature = "ts", ts(export))]
33542pub struct UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
33543 #[doc = "UTC time in seconds since GPS epoch (Jan 6, 1980). If unknown set to UINT32_MAX"]
33544 pub utcTime: u32,
33545 #[doc = "Latitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
33546 pub gpsLat: i32,
33547 #[doc = "Longitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
33548 pub gpsLon: i32,
33549 #[doc = "Altitude (WGS84). UP +ve. If unknown set to INT32_MAX"]
33550 pub gpsAlt: i32,
33551 #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
33552 pub baroAltMSL: i32,
33553 #[doc = "Horizontal accuracy in mm (m * 1E-3). If unknown set to UINT32_MAX"]
33554 pub accuracyHor: u32,
33555 #[doc = "Vertical accuracy in cm. If unknown set to UINT16_MAX"]
33556 pub accuracyVert: u16,
33557 #[doc = "Velocity accuracy in mm/s (m * 1E-3). If unknown set to UINT16_MAX"]
33558 pub accuracyVel: u16,
33559 #[doc = "GPS vertical speed in cm/s. If unknown set to INT16_MAX"]
33560 pub velVert: i16,
33561 #[doc = "North-South velocity over ground in cm/s North +ve. If unknown set to INT16_MAX"]
33562 pub velNS: i16,
33563 #[doc = "East-West velocity over ground in cm/s East +ve. If unknown set to INT16_MAX"]
33564 pub VelEW: i16,
33565 #[doc = "ADS-B transponder dynamic input state flags"]
33566 pub state: UavionixAdsbOutDynamicState,
33567 #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
33568 pub squawk: u16,
33569 #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK"]
33570 pub gpsFix: UavionixAdsbOutDynamicGpsFix,
33571 #[doc = "Number of satellites visible. If unknown set to UINT8_MAX"]
33572 pub numSats: u8,
33573 #[doc = "Emergency status"]
33574 pub emergencyStatus: UavionixAdsbEmergencyStatus,
33575}
33576impl UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
33577 pub const ENCODED_LEN: usize = 41usize;
33578 pub const DEFAULT: Self = Self {
33579 utcTime: 0_u32,
33580 gpsLat: 0_i32,
33581 gpsLon: 0_i32,
33582 gpsAlt: 0_i32,
33583 baroAltMSL: 0_i32,
33584 accuracyHor: 0_u32,
33585 accuracyVert: 0_u16,
33586 accuracyVel: 0_u16,
33587 velVert: 0_i16,
33588 velNS: 0_i16,
33589 VelEW: 0_i16,
33590 state: UavionixAdsbOutDynamicState::DEFAULT,
33591 squawk: 0_u16,
33592 gpsFix: UavionixAdsbOutDynamicGpsFix::DEFAULT,
33593 numSats: 0_u8,
33594 emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
33595 };
33596 #[cfg(feature = "arbitrary")]
33597 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33598 use arbitrary::{Arbitrary, Unstructured};
33599 let mut buf = [0u8; 1024];
33600 rng.fill_bytes(&mut buf);
33601 let mut unstructured = Unstructured::new(&buf);
33602 Self::arbitrary(&mut unstructured).unwrap_or_default()
33603 }
33604}
33605impl Default for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
33606 fn default() -> Self {
33607 Self::DEFAULT.clone()
33608 }
33609}
33610impl MessageData for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
33611 type Message = MavMessage;
33612 const ID: u32 = 10002u32;
33613 const NAME: &'static str = "UAVIONIX_ADSB_OUT_DYNAMIC";
33614 const EXTRA_CRC: u8 = 186u8;
33615 const ENCODED_LEN: usize = 41usize;
33616 fn deser(
33617 _version: MavlinkVersion,
33618 __input: &[u8],
33619 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33620 let avail_len = __input.len();
33621 let mut payload_buf = [0; Self::ENCODED_LEN];
33622 let mut buf = if avail_len < Self::ENCODED_LEN {
33623 payload_buf[0..avail_len].copy_from_slice(__input);
33624 Bytes::new(&payload_buf)
33625 } else {
33626 Bytes::new(__input)
33627 };
33628 let mut __struct = Self::default();
33629 __struct.utcTime = buf.get_u32_le()?;
33630 __struct.gpsLat = buf.get_i32_le()?;
33631 __struct.gpsLon = buf.get_i32_le()?;
33632 __struct.gpsAlt = buf.get_i32_le()?;
33633 __struct.baroAltMSL = buf.get_i32_le()?;
33634 __struct.accuracyHor = buf.get_u32_le()?;
33635 __struct.accuracyVert = buf.get_u16_le()?;
33636 __struct.accuracyVel = buf.get_u16_le()?;
33637 __struct.velVert = buf.get_i16_le()?;
33638 __struct.velNS = buf.get_i16_le()?;
33639 __struct.VelEW = buf.get_i16_le()?;
33640 let tmp = buf.get_u16_le()?;
33641 __struct.state = UavionixAdsbOutDynamicState::from_bits(
33642 tmp as <UavionixAdsbOutDynamicState as Flags>::Bits,
33643 )
33644 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33645 flag_type: "UavionixAdsbOutDynamicState",
33646 value: tmp as u64,
33647 })?;
33648 __struct.squawk = buf.get_u16_le()?;
33649 let tmp = buf.get_u8()?;
33650 __struct.gpsFix =
33651 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33652 enum_type: "UavionixAdsbOutDynamicGpsFix",
33653 value: tmp as u64,
33654 })?;
33655 __struct.numSats = buf.get_u8()?;
33656 let tmp = buf.get_u8()?;
33657 __struct.emergencyStatus =
33658 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33659 enum_type: "UavionixAdsbEmergencyStatus",
33660 value: tmp as u64,
33661 })?;
33662 Ok(__struct)
33663 }
33664 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33665 let mut __tmp = BytesMut::new(bytes);
33666 #[allow(clippy::absurd_extreme_comparisons)]
33667 #[allow(unused_comparisons)]
33668 if __tmp.remaining() < Self::ENCODED_LEN {
33669 panic!(
33670 "buffer is too small (need {} bytes, but got {})",
33671 Self::ENCODED_LEN,
33672 __tmp.remaining(),
33673 )
33674 }
33675 __tmp.put_u32_le(self.utcTime);
33676 __tmp.put_i32_le(self.gpsLat);
33677 __tmp.put_i32_le(self.gpsLon);
33678 __tmp.put_i32_le(self.gpsAlt);
33679 __tmp.put_i32_le(self.baroAltMSL);
33680 __tmp.put_u32_le(self.accuracyHor);
33681 __tmp.put_u16_le(self.accuracyVert);
33682 __tmp.put_u16_le(self.accuracyVel);
33683 __tmp.put_i16_le(self.velVert);
33684 __tmp.put_i16_le(self.velNS);
33685 __tmp.put_i16_le(self.VelEW);
33686 __tmp.put_u16_le(self.state.bits() as u16);
33687 __tmp.put_u16_le(self.squawk);
33688 __tmp.put_u8(self.gpsFix as u8);
33689 __tmp.put_u8(self.numSats);
33690 __tmp.put_u8(self.emergencyStatus as u8);
33691 if matches!(version, MavlinkVersion::V2) {
33692 let len = __tmp.len();
33693 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33694 } else {
33695 __tmp.len()
33696 }
33697 }
33698}
33699#[doc = "Status message with information from UCP Heartbeat and Status messages."]
33700#[doc = ""]
33701#[doc = "ID: 10008"]
33702#[derive(Debug, Clone, PartialEq)]
33703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33705#[cfg_attr(feature = "ts", derive(TS))]
33706#[cfg_attr(feature = "ts", ts(export))]
33707pub struct UAVIONIX_ADSB_OUT_STATUS_DATA {
33708 #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
33709 pub squawk: u16,
33710 #[doc = "ADS-B transponder status state flags"]
33711 pub state: UavionixAdsbOutStatusState,
33712 #[doc = "Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively"]
33713 pub NIC_NACp: UavionixAdsbOutStatusNicNacp,
33714 #[doc = "Board temperature in C"]
33715 pub boardTemp: u8,
33716 #[doc = "ADS-B transponder fault flags"]
33717 pub fault: UavionixAdsbOutStatusFault,
33718 #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
33719 #[cfg_attr(feature = "ts", ts(type = "string"))]
33720 pub flight_id: CharArray<8>,
33721}
33722impl UAVIONIX_ADSB_OUT_STATUS_DATA {
33723 pub const ENCODED_LEN: usize = 14usize;
33724 pub const DEFAULT: Self = Self {
33725 squawk: 0_u16,
33726 state: UavionixAdsbOutStatusState::DEFAULT,
33727 NIC_NACp: UavionixAdsbOutStatusNicNacp::DEFAULT,
33728 boardTemp: 0_u8,
33729 fault: UavionixAdsbOutStatusFault::DEFAULT,
33730 flight_id: CharArray::new([0_u8; 8usize]),
33731 };
33732 #[cfg(feature = "arbitrary")]
33733 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33734 use arbitrary::{Arbitrary, Unstructured};
33735 let mut buf = [0u8; 1024];
33736 rng.fill_bytes(&mut buf);
33737 let mut unstructured = Unstructured::new(&buf);
33738 Self::arbitrary(&mut unstructured).unwrap_or_default()
33739 }
33740}
33741impl Default for UAVIONIX_ADSB_OUT_STATUS_DATA {
33742 fn default() -> Self {
33743 Self::DEFAULT.clone()
33744 }
33745}
33746impl MessageData for UAVIONIX_ADSB_OUT_STATUS_DATA {
33747 type Message = MavMessage;
33748 const ID: u32 = 10008u32;
33749 const NAME: &'static str = "UAVIONIX_ADSB_OUT_STATUS";
33750 const EXTRA_CRC: u8 = 240u8;
33751 const ENCODED_LEN: usize = 14usize;
33752 fn deser(
33753 _version: MavlinkVersion,
33754 __input: &[u8],
33755 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33756 let avail_len = __input.len();
33757 let mut payload_buf = [0; Self::ENCODED_LEN];
33758 let mut buf = if avail_len < Self::ENCODED_LEN {
33759 payload_buf[0..avail_len].copy_from_slice(__input);
33760 Bytes::new(&payload_buf)
33761 } else {
33762 Bytes::new(__input)
33763 };
33764 let mut __struct = Self::default();
33765 __struct.squawk = buf.get_u16_le()?;
33766 let tmp = buf.get_u8()?;
33767 __struct.state = UavionixAdsbOutStatusState::from_bits(
33768 tmp as <UavionixAdsbOutStatusState as Flags>::Bits,
33769 )
33770 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33771 flag_type: "UavionixAdsbOutStatusState",
33772 value: tmp as u64,
33773 })?;
33774 let tmp = buf.get_u8()?;
33775 __struct.NIC_NACp =
33776 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33777 enum_type: "UavionixAdsbOutStatusNicNacp",
33778 value: tmp as u64,
33779 })?;
33780 __struct.boardTemp = buf.get_u8()?;
33781 let tmp = buf.get_u8()?;
33782 __struct.fault = UavionixAdsbOutStatusFault::from_bits(
33783 tmp as <UavionixAdsbOutStatusFault as Flags>::Bits,
33784 )
33785 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33786 flag_type: "UavionixAdsbOutStatusFault",
33787 value: tmp as u64,
33788 })?;
33789 let mut tmp = [0_u8; 8usize];
33790 for v in &mut tmp {
33791 *v = buf.get_u8()?;
33792 }
33793 __struct.flight_id = CharArray::new(tmp);
33794 Ok(__struct)
33795 }
33796 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33797 let mut __tmp = BytesMut::new(bytes);
33798 #[allow(clippy::absurd_extreme_comparisons)]
33799 #[allow(unused_comparisons)]
33800 if __tmp.remaining() < Self::ENCODED_LEN {
33801 panic!(
33802 "buffer is too small (need {} bytes, but got {})",
33803 Self::ENCODED_LEN,
33804 __tmp.remaining(),
33805 )
33806 }
33807 __tmp.put_u16_le(self.squawk);
33808 __tmp.put_u8(self.state.bits() as u8);
33809 __tmp.put_u8(self.NIC_NACp as u8);
33810 __tmp.put_u8(self.boardTemp);
33811 __tmp.put_u8(self.fault.bits() as u8);
33812 for val in &self.flight_id {
33813 __tmp.put_u8(*val);
33814 }
33815 if matches!(version, MavlinkVersion::V2) {
33816 let len = __tmp.len();
33817 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33818 } else {
33819 __tmp.len()
33820 }
33821 }
33822}
33823#[doc = "Transceiver heartbeat with health report (updated every 10s)."]
33824#[doc = ""]
33825#[doc = "ID: 10003"]
33826#[derive(Debug, Clone, PartialEq)]
33827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33829#[cfg_attr(feature = "ts", derive(TS))]
33830#[cfg_attr(feature = "ts", ts(export))]
33831pub struct UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
33832 #[doc = "ADS-B transponder messages"]
33833 pub rfHealth: UavionixAdsbRfHealth,
33834}
33835impl UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
33836 pub const ENCODED_LEN: usize = 1usize;
33837 pub const DEFAULT: Self = Self {
33838 rfHealth: UavionixAdsbRfHealth::DEFAULT,
33839 };
33840 #[cfg(feature = "arbitrary")]
33841 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33842 use arbitrary::{Arbitrary, Unstructured};
33843 let mut buf = [0u8; 1024];
33844 rng.fill_bytes(&mut buf);
33845 let mut unstructured = Unstructured::new(&buf);
33846 Self::arbitrary(&mut unstructured).unwrap_or_default()
33847 }
33848}
33849impl Default for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
33850 fn default() -> Self {
33851 Self::DEFAULT.clone()
33852 }
33853}
33854impl MessageData for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
33855 type Message = MavMessage;
33856 const ID: u32 = 10003u32;
33857 const NAME: &'static str = "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT";
33858 const EXTRA_CRC: u8 = 4u8;
33859 const ENCODED_LEN: usize = 1usize;
33860 fn deser(
33861 _version: MavlinkVersion,
33862 __input: &[u8],
33863 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33864 let avail_len = __input.len();
33865 let mut payload_buf = [0; Self::ENCODED_LEN];
33866 let mut buf = if avail_len < Self::ENCODED_LEN {
33867 payload_buf[0..avail_len].copy_from_slice(__input);
33868 Bytes::new(&payload_buf)
33869 } else {
33870 Bytes::new(__input)
33871 };
33872 let mut __struct = Self::default();
33873 let tmp = buf.get_u8()?;
33874 __struct.rfHealth = UavionixAdsbRfHealth::from_bits(
33875 tmp as <UavionixAdsbRfHealth as Flags>::Bits,
33876 )
33877 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33878 flag_type: "UavionixAdsbRfHealth",
33879 value: tmp as u64,
33880 })?;
33881 Ok(__struct)
33882 }
33883 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33884 let mut __tmp = BytesMut::new(bytes);
33885 #[allow(clippy::absurd_extreme_comparisons)]
33886 #[allow(unused_comparisons)]
33887 if __tmp.remaining() < Self::ENCODED_LEN {
33888 panic!(
33889 "buffer is too small (need {} bytes, but got {})",
33890 Self::ENCODED_LEN,
33891 __tmp.remaining(),
33892 )
33893 }
33894 __tmp.put_u8(self.rfHealth.bits() as u8);
33895 if matches!(version, MavlinkVersion::V2) {
33896 let len = __tmp.len();
33897 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33898 } else {
33899 __tmp.len()
33900 }
33901 }
33902}
33903#[doc = "The global position resulting from GPS and sensor fusion."]
33904#[doc = ""]
33905#[doc = "ID: 340"]
33906#[derive(Debug, Clone, PartialEq)]
33907#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33909#[cfg_attr(feature = "ts", derive(TS))]
33910#[cfg_attr(feature = "ts", ts(export))]
33911pub struct UTM_GLOBAL_POSITION_DATA {
33912 #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
33913 pub time: u64,
33914 #[doc = "Latitude (WGS84)"]
33915 pub lat: i32,
33916 #[doc = "Longitude (WGS84)"]
33917 pub lon: i32,
33918 #[doc = "Altitude (WGS84)"]
33919 pub alt: i32,
33920 #[doc = "Altitude above ground"]
33921 pub relative_alt: i32,
33922 #[doc = "Next waypoint, latitude (WGS84)"]
33923 pub next_lat: i32,
33924 #[doc = "Next waypoint, longitude (WGS84)"]
33925 pub next_lon: i32,
33926 #[doc = "Next waypoint, altitude (WGS84)"]
33927 pub next_alt: i32,
33928 #[doc = "Ground X speed (latitude, positive north)"]
33929 pub vx: i16,
33930 #[doc = "Ground Y speed (longitude, positive east)"]
33931 pub vy: i16,
33932 #[doc = "Ground Z speed (altitude, positive down)"]
33933 pub vz: i16,
33934 #[doc = "Horizontal position uncertainty (standard deviation)"]
33935 pub h_acc: u16,
33936 #[doc = "Altitude uncertainty (standard deviation)"]
33937 pub v_acc: u16,
33938 #[doc = "Speed uncertainty (standard deviation)"]
33939 pub vel_acc: u16,
33940 #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
33941 pub update_rate: u16,
33942 #[doc = "Unique UAS ID."]
33943 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33944 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33945 pub uas_id: [u8; 18],
33946 #[doc = "Flight state"]
33947 pub flight_state: UtmFlightState,
33948 #[doc = "Bitwise OR combination of the data available flags."]
33949 pub flags: UtmDataAvailFlags,
33950}
33951impl UTM_GLOBAL_POSITION_DATA {
33952 pub const ENCODED_LEN: usize = 70usize;
33953 pub const DEFAULT: Self = Self {
33954 time: 0_u64,
33955 lat: 0_i32,
33956 lon: 0_i32,
33957 alt: 0_i32,
33958 relative_alt: 0_i32,
33959 next_lat: 0_i32,
33960 next_lon: 0_i32,
33961 next_alt: 0_i32,
33962 vx: 0_i16,
33963 vy: 0_i16,
33964 vz: 0_i16,
33965 h_acc: 0_u16,
33966 v_acc: 0_u16,
33967 vel_acc: 0_u16,
33968 update_rate: 0_u16,
33969 uas_id: [0_u8; 18usize],
33970 flight_state: UtmFlightState::DEFAULT,
33971 flags: UtmDataAvailFlags::DEFAULT,
33972 };
33973 #[cfg(feature = "arbitrary")]
33974 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33975 use arbitrary::{Arbitrary, Unstructured};
33976 let mut buf = [0u8; 1024];
33977 rng.fill_bytes(&mut buf);
33978 let mut unstructured = Unstructured::new(&buf);
33979 Self::arbitrary(&mut unstructured).unwrap_or_default()
33980 }
33981}
33982impl Default for UTM_GLOBAL_POSITION_DATA {
33983 fn default() -> Self {
33984 Self::DEFAULT.clone()
33985 }
33986}
33987impl MessageData for UTM_GLOBAL_POSITION_DATA {
33988 type Message = MavMessage;
33989 const ID: u32 = 340u32;
33990 const NAME: &'static str = "UTM_GLOBAL_POSITION";
33991 const EXTRA_CRC: u8 = 99u8;
33992 const ENCODED_LEN: usize = 70usize;
33993 fn deser(
33994 _version: MavlinkVersion,
33995 __input: &[u8],
33996 ) -> Result<Self, ::mavlink_core::error::ParserError> {
33997 let avail_len = __input.len();
33998 let mut payload_buf = [0; Self::ENCODED_LEN];
33999 let mut buf = if avail_len < Self::ENCODED_LEN {
34000 payload_buf[0..avail_len].copy_from_slice(__input);
34001 Bytes::new(&payload_buf)
34002 } else {
34003 Bytes::new(__input)
34004 };
34005 let mut __struct = Self::default();
34006 __struct.time = buf.get_u64_le()?;
34007 __struct.lat = buf.get_i32_le()?;
34008 __struct.lon = buf.get_i32_le()?;
34009 __struct.alt = buf.get_i32_le()?;
34010 __struct.relative_alt = buf.get_i32_le()?;
34011 __struct.next_lat = buf.get_i32_le()?;
34012 __struct.next_lon = buf.get_i32_le()?;
34013 __struct.next_alt = buf.get_i32_le()?;
34014 __struct.vx = buf.get_i16_le()?;
34015 __struct.vy = buf.get_i16_le()?;
34016 __struct.vz = buf.get_i16_le()?;
34017 __struct.h_acc = buf.get_u16_le()?;
34018 __struct.v_acc = buf.get_u16_le()?;
34019 __struct.vel_acc = buf.get_u16_le()?;
34020 __struct.update_rate = buf.get_u16_le()?;
34021 for v in &mut __struct.uas_id {
34022 let val = buf.get_u8()?;
34023 *v = val;
34024 }
34025 let tmp = buf.get_u8()?;
34026 __struct.flight_state =
34027 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34028 enum_type: "UtmFlightState",
34029 value: tmp as u64,
34030 })?;
34031 let tmp = buf.get_u8()?;
34032 __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
34033 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34034 flag_type: "UtmDataAvailFlags",
34035 value: tmp as u64,
34036 })?;
34037 Ok(__struct)
34038 }
34039 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34040 let mut __tmp = BytesMut::new(bytes);
34041 #[allow(clippy::absurd_extreme_comparisons)]
34042 #[allow(unused_comparisons)]
34043 if __tmp.remaining() < Self::ENCODED_LEN {
34044 panic!(
34045 "buffer is too small (need {} bytes, but got {})",
34046 Self::ENCODED_LEN,
34047 __tmp.remaining(),
34048 )
34049 }
34050 __tmp.put_u64_le(self.time);
34051 __tmp.put_i32_le(self.lat);
34052 __tmp.put_i32_le(self.lon);
34053 __tmp.put_i32_le(self.alt);
34054 __tmp.put_i32_le(self.relative_alt);
34055 __tmp.put_i32_le(self.next_lat);
34056 __tmp.put_i32_le(self.next_lon);
34057 __tmp.put_i32_le(self.next_alt);
34058 __tmp.put_i16_le(self.vx);
34059 __tmp.put_i16_le(self.vy);
34060 __tmp.put_i16_le(self.vz);
34061 __tmp.put_u16_le(self.h_acc);
34062 __tmp.put_u16_le(self.v_acc);
34063 __tmp.put_u16_le(self.vel_acc);
34064 __tmp.put_u16_le(self.update_rate);
34065 for val in &self.uas_id {
34066 __tmp.put_u8(*val);
34067 }
34068 __tmp.put_u8(self.flight_state as u8);
34069 __tmp.put_u8(self.flags.bits() as u8);
34070 if matches!(version, MavlinkVersion::V2) {
34071 let len = __tmp.len();
34072 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34073 } else {
34074 __tmp.len()
34075 }
34076 }
34077}
34078#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
34079#[doc = ""]
34080#[doc = "ID: 248"]
34081#[derive(Debug, Clone, PartialEq)]
34082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34084#[cfg_attr(feature = "ts", derive(TS))]
34085#[cfg_attr(feature = "ts", ts(export))]
34086pub struct V2_EXTENSION_DATA {
34087 #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
34088 pub message_type: u16,
34089 #[doc = "Network ID (0 for broadcast)"]
34090 pub target_network: u8,
34091 #[doc = "System ID (0 for broadcast)"]
34092 pub target_system: u8,
34093 #[doc = "Component ID (0 for broadcast)"]
34094 pub target_component: u8,
34095 #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
34096 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34097 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34098 pub payload: [u8; 249],
34099}
34100impl V2_EXTENSION_DATA {
34101 pub const ENCODED_LEN: usize = 254usize;
34102 pub const DEFAULT: Self = Self {
34103 message_type: 0_u16,
34104 target_network: 0_u8,
34105 target_system: 0_u8,
34106 target_component: 0_u8,
34107 payload: [0_u8; 249usize],
34108 };
34109 #[cfg(feature = "arbitrary")]
34110 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34111 use arbitrary::{Arbitrary, Unstructured};
34112 let mut buf = [0u8; 1024];
34113 rng.fill_bytes(&mut buf);
34114 let mut unstructured = Unstructured::new(&buf);
34115 Self::arbitrary(&mut unstructured).unwrap_or_default()
34116 }
34117}
34118impl Default for V2_EXTENSION_DATA {
34119 fn default() -> Self {
34120 Self::DEFAULT.clone()
34121 }
34122}
34123impl MessageData for V2_EXTENSION_DATA {
34124 type Message = MavMessage;
34125 const ID: u32 = 248u32;
34126 const NAME: &'static str = "V2_EXTENSION";
34127 const EXTRA_CRC: u8 = 8u8;
34128 const ENCODED_LEN: usize = 254usize;
34129 fn deser(
34130 _version: MavlinkVersion,
34131 __input: &[u8],
34132 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34133 let avail_len = __input.len();
34134 let mut payload_buf = [0; Self::ENCODED_LEN];
34135 let mut buf = if avail_len < Self::ENCODED_LEN {
34136 payload_buf[0..avail_len].copy_from_slice(__input);
34137 Bytes::new(&payload_buf)
34138 } else {
34139 Bytes::new(__input)
34140 };
34141 let mut __struct = Self::default();
34142 __struct.message_type = buf.get_u16_le()?;
34143 __struct.target_network = buf.get_u8()?;
34144 __struct.target_system = buf.get_u8()?;
34145 __struct.target_component = buf.get_u8()?;
34146 for v in &mut __struct.payload {
34147 let val = buf.get_u8()?;
34148 *v = val;
34149 }
34150 Ok(__struct)
34151 }
34152 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34153 let mut __tmp = BytesMut::new(bytes);
34154 #[allow(clippy::absurd_extreme_comparisons)]
34155 #[allow(unused_comparisons)]
34156 if __tmp.remaining() < Self::ENCODED_LEN {
34157 panic!(
34158 "buffer is too small (need {} bytes, but got {})",
34159 Self::ENCODED_LEN,
34160 __tmp.remaining(),
34161 )
34162 }
34163 __tmp.put_u16_le(self.message_type);
34164 __tmp.put_u8(self.target_network);
34165 __tmp.put_u8(self.target_system);
34166 __tmp.put_u8(self.target_component);
34167 for val in &self.payload {
34168 __tmp.put_u8(*val);
34169 }
34170 if matches!(version, MavlinkVersion::V2) {
34171 let len = __tmp.len();
34172 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34173 } else {
34174 __tmp.len()
34175 }
34176 }
34177}
34178#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
34179#[doc = ""]
34180#[doc = "ID: 74"]
34181#[derive(Debug, Clone, PartialEq)]
34182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34184#[cfg_attr(feature = "ts", derive(TS))]
34185#[cfg_attr(feature = "ts", ts(export))]
34186pub struct VFR_HUD_DATA {
34187 #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
34188 pub airspeed: f32,
34189 #[doc = "Current ground speed."]
34190 pub groundspeed: f32,
34191 #[doc = "Current altitude (MSL)."]
34192 pub alt: f32,
34193 #[doc = "Current climb rate."]
34194 pub climb: f32,
34195 #[doc = "Current heading in compass units (0-360, 0=north)."]
34196 pub heading: i16,
34197 #[doc = "Current throttle setting (0 to 100)."]
34198 pub throttle: u16,
34199}
34200impl VFR_HUD_DATA {
34201 pub const ENCODED_LEN: usize = 20usize;
34202 pub const DEFAULT: Self = Self {
34203 airspeed: 0.0_f32,
34204 groundspeed: 0.0_f32,
34205 alt: 0.0_f32,
34206 climb: 0.0_f32,
34207 heading: 0_i16,
34208 throttle: 0_u16,
34209 };
34210 #[cfg(feature = "arbitrary")]
34211 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34212 use arbitrary::{Arbitrary, Unstructured};
34213 let mut buf = [0u8; 1024];
34214 rng.fill_bytes(&mut buf);
34215 let mut unstructured = Unstructured::new(&buf);
34216 Self::arbitrary(&mut unstructured).unwrap_or_default()
34217 }
34218}
34219impl Default for VFR_HUD_DATA {
34220 fn default() -> Self {
34221 Self::DEFAULT.clone()
34222 }
34223}
34224impl MessageData for VFR_HUD_DATA {
34225 type Message = MavMessage;
34226 const ID: u32 = 74u32;
34227 const NAME: &'static str = "VFR_HUD";
34228 const EXTRA_CRC: u8 = 20u8;
34229 const ENCODED_LEN: usize = 20usize;
34230 fn deser(
34231 _version: MavlinkVersion,
34232 __input: &[u8],
34233 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34234 let avail_len = __input.len();
34235 let mut payload_buf = [0; Self::ENCODED_LEN];
34236 let mut buf = if avail_len < Self::ENCODED_LEN {
34237 payload_buf[0..avail_len].copy_from_slice(__input);
34238 Bytes::new(&payload_buf)
34239 } else {
34240 Bytes::new(__input)
34241 };
34242 let mut __struct = Self::default();
34243 __struct.airspeed = buf.get_f32_le()?;
34244 __struct.groundspeed = buf.get_f32_le()?;
34245 __struct.alt = buf.get_f32_le()?;
34246 __struct.climb = buf.get_f32_le()?;
34247 __struct.heading = buf.get_i16_le()?;
34248 __struct.throttle = buf.get_u16_le()?;
34249 Ok(__struct)
34250 }
34251 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34252 let mut __tmp = BytesMut::new(bytes);
34253 #[allow(clippy::absurd_extreme_comparisons)]
34254 #[allow(unused_comparisons)]
34255 if __tmp.remaining() < Self::ENCODED_LEN {
34256 panic!(
34257 "buffer is too small (need {} bytes, but got {})",
34258 Self::ENCODED_LEN,
34259 __tmp.remaining(),
34260 )
34261 }
34262 __tmp.put_f32_le(self.airspeed);
34263 __tmp.put_f32_le(self.groundspeed);
34264 __tmp.put_f32_le(self.alt);
34265 __tmp.put_f32_le(self.climb);
34266 __tmp.put_i16_le(self.heading);
34267 __tmp.put_u16_le(self.throttle);
34268 if matches!(version, MavlinkVersion::V2) {
34269 let len = __tmp.len();
34270 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34271 } else {
34272 __tmp.len()
34273 }
34274 }
34275}
34276#[doc = "Vibration levels and accelerometer clipping."]
34277#[doc = ""]
34278#[doc = "ID: 241"]
34279#[derive(Debug, Clone, PartialEq)]
34280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34282#[cfg_attr(feature = "ts", derive(TS))]
34283#[cfg_attr(feature = "ts", ts(export))]
34284pub struct VIBRATION_DATA {
34285 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34286 pub time_usec: u64,
34287 #[doc = "Vibration levels on X-axis"]
34288 pub vibration_x: f32,
34289 #[doc = "Vibration levels on Y-axis"]
34290 pub vibration_y: f32,
34291 #[doc = "Vibration levels on Z-axis"]
34292 pub vibration_z: f32,
34293 #[doc = "first accelerometer clipping count"]
34294 pub clipping_0: u32,
34295 #[doc = "second accelerometer clipping count"]
34296 pub clipping_1: u32,
34297 #[doc = "third accelerometer clipping count"]
34298 pub clipping_2: u32,
34299}
34300impl VIBRATION_DATA {
34301 pub const ENCODED_LEN: usize = 32usize;
34302 pub const DEFAULT: Self = Self {
34303 time_usec: 0_u64,
34304 vibration_x: 0.0_f32,
34305 vibration_y: 0.0_f32,
34306 vibration_z: 0.0_f32,
34307 clipping_0: 0_u32,
34308 clipping_1: 0_u32,
34309 clipping_2: 0_u32,
34310 };
34311 #[cfg(feature = "arbitrary")]
34312 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34313 use arbitrary::{Arbitrary, Unstructured};
34314 let mut buf = [0u8; 1024];
34315 rng.fill_bytes(&mut buf);
34316 let mut unstructured = Unstructured::new(&buf);
34317 Self::arbitrary(&mut unstructured).unwrap_or_default()
34318 }
34319}
34320impl Default for VIBRATION_DATA {
34321 fn default() -> Self {
34322 Self::DEFAULT.clone()
34323 }
34324}
34325impl MessageData for VIBRATION_DATA {
34326 type Message = MavMessage;
34327 const ID: u32 = 241u32;
34328 const NAME: &'static str = "VIBRATION";
34329 const EXTRA_CRC: u8 = 90u8;
34330 const ENCODED_LEN: usize = 32usize;
34331 fn deser(
34332 _version: MavlinkVersion,
34333 __input: &[u8],
34334 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34335 let avail_len = __input.len();
34336 let mut payload_buf = [0; Self::ENCODED_LEN];
34337 let mut buf = if avail_len < Self::ENCODED_LEN {
34338 payload_buf[0..avail_len].copy_from_slice(__input);
34339 Bytes::new(&payload_buf)
34340 } else {
34341 Bytes::new(__input)
34342 };
34343 let mut __struct = Self::default();
34344 __struct.time_usec = buf.get_u64_le()?;
34345 __struct.vibration_x = buf.get_f32_le()?;
34346 __struct.vibration_y = buf.get_f32_le()?;
34347 __struct.vibration_z = buf.get_f32_le()?;
34348 __struct.clipping_0 = buf.get_u32_le()?;
34349 __struct.clipping_1 = buf.get_u32_le()?;
34350 __struct.clipping_2 = buf.get_u32_le()?;
34351 Ok(__struct)
34352 }
34353 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34354 let mut __tmp = BytesMut::new(bytes);
34355 #[allow(clippy::absurd_extreme_comparisons)]
34356 #[allow(unused_comparisons)]
34357 if __tmp.remaining() < Self::ENCODED_LEN {
34358 panic!(
34359 "buffer is too small (need {} bytes, but got {})",
34360 Self::ENCODED_LEN,
34361 __tmp.remaining(),
34362 )
34363 }
34364 __tmp.put_u64_le(self.time_usec);
34365 __tmp.put_f32_le(self.vibration_x);
34366 __tmp.put_f32_le(self.vibration_y);
34367 __tmp.put_f32_le(self.vibration_z);
34368 __tmp.put_u32_le(self.clipping_0);
34369 __tmp.put_u32_le(self.clipping_1);
34370 __tmp.put_u32_le(self.clipping_2);
34371 if matches!(version, MavlinkVersion::V2) {
34372 let len = __tmp.len();
34373 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34374 } else {
34375 __tmp.len()
34376 }
34377 }
34378}
34379#[doc = "Global position estimate from a Vicon motion system source."]
34380#[doc = ""]
34381#[doc = "ID: 104"]
34382#[derive(Debug, Clone, PartialEq)]
34383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34385#[cfg_attr(feature = "ts", derive(TS))]
34386#[cfg_attr(feature = "ts", ts(export))]
34387pub struct VICON_POSITION_ESTIMATE_DATA {
34388 #[doc = "Timestamp (UNIX time or time since system boot)"]
34389 pub usec: u64,
34390 #[doc = "Global X position"]
34391 pub x: f32,
34392 #[doc = "Global Y position"]
34393 pub y: f32,
34394 #[doc = "Global Z position"]
34395 pub z: f32,
34396 #[doc = "Roll angle"]
34397 pub roll: f32,
34398 #[doc = "Pitch angle"]
34399 pub pitch: f32,
34400 #[doc = "Yaw angle"]
34401 pub yaw: f32,
34402 #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
34403 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34404 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34405 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34406 pub covariance: [f32; 21],
34407}
34408impl VICON_POSITION_ESTIMATE_DATA {
34409 pub const ENCODED_LEN: usize = 116usize;
34410 pub const DEFAULT: Self = Self {
34411 usec: 0_u64,
34412 x: 0.0_f32,
34413 y: 0.0_f32,
34414 z: 0.0_f32,
34415 roll: 0.0_f32,
34416 pitch: 0.0_f32,
34417 yaw: 0.0_f32,
34418 covariance: [0.0_f32; 21usize],
34419 };
34420 #[cfg(feature = "arbitrary")]
34421 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34422 use arbitrary::{Arbitrary, Unstructured};
34423 let mut buf = [0u8; 1024];
34424 rng.fill_bytes(&mut buf);
34425 let mut unstructured = Unstructured::new(&buf);
34426 Self::arbitrary(&mut unstructured).unwrap_or_default()
34427 }
34428}
34429impl Default for VICON_POSITION_ESTIMATE_DATA {
34430 fn default() -> Self {
34431 Self::DEFAULT.clone()
34432 }
34433}
34434impl MessageData for VICON_POSITION_ESTIMATE_DATA {
34435 type Message = MavMessage;
34436 const ID: u32 = 104u32;
34437 const NAME: &'static str = "VICON_POSITION_ESTIMATE";
34438 const EXTRA_CRC: u8 = 56u8;
34439 const ENCODED_LEN: usize = 116usize;
34440 fn deser(
34441 _version: MavlinkVersion,
34442 __input: &[u8],
34443 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34444 let avail_len = __input.len();
34445 let mut payload_buf = [0; Self::ENCODED_LEN];
34446 let mut buf = if avail_len < Self::ENCODED_LEN {
34447 payload_buf[0..avail_len].copy_from_slice(__input);
34448 Bytes::new(&payload_buf)
34449 } else {
34450 Bytes::new(__input)
34451 };
34452 let mut __struct = Self::default();
34453 __struct.usec = buf.get_u64_le()?;
34454 __struct.x = buf.get_f32_le()?;
34455 __struct.y = buf.get_f32_le()?;
34456 __struct.z = buf.get_f32_le()?;
34457 __struct.roll = buf.get_f32_le()?;
34458 __struct.pitch = buf.get_f32_le()?;
34459 __struct.yaw = buf.get_f32_le()?;
34460 for v in &mut __struct.covariance {
34461 let val = buf.get_f32_le()?;
34462 *v = val;
34463 }
34464 Ok(__struct)
34465 }
34466 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34467 let mut __tmp = BytesMut::new(bytes);
34468 #[allow(clippy::absurd_extreme_comparisons)]
34469 #[allow(unused_comparisons)]
34470 if __tmp.remaining() < Self::ENCODED_LEN {
34471 panic!(
34472 "buffer is too small (need {} bytes, but got {})",
34473 Self::ENCODED_LEN,
34474 __tmp.remaining(),
34475 )
34476 }
34477 __tmp.put_u64_le(self.usec);
34478 __tmp.put_f32_le(self.x);
34479 __tmp.put_f32_le(self.y);
34480 __tmp.put_f32_le(self.z);
34481 __tmp.put_f32_le(self.roll);
34482 __tmp.put_f32_le(self.pitch);
34483 __tmp.put_f32_le(self.yaw);
34484 if matches!(version, MavlinkVersion::V2) {
34485 for val in &self.covariance {
34486 __tmp.put_f32_le(*val);
34487 }
34488 let len = __tmp.len();
34489 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34490 } else {
34491 __tmp.len()
34492 }
34493 }
34494}
34495#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
34496#[doc = ""]
34497#[doc = "ID: 269"]
34498#[derive(Debug, Clone, PartialEq)]
34499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34501#[cfg_attr(feature = "ts", derive(TS))]
34502#[cfg_attr(feature = "ts", ts(export))]
34503pub struct VIDEO_STREAM_INFORMATION_DATA {
34504 #[doc = "Frame rate."]
34505 pub framerate: f32,
34506 #[doc = "Bit rate."]
34507 pub bitrate: u32,
34508 #[doc = "Bitmap of stream status flags."]
34509 pub flags: VideoStreamStatusFlags,
34510 #[doc = "Horizontal resolution."]
34511 pub resolution_h: u16,
34512 #[doc = "Vertical resolution."]
34513 pub resolution_v: u16,
34514 #[doc = "Video image rotation clockwise."]
34515 pub rotation: u16,
34516 #[doc = "Horizontal Field of view."]
34517 pub hfov: u16,
34518 #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
34519 pub stream_id: u8,
34520 #[doc = "Number of streams available."]
34521 pub count: u8,
34522 #[doc = "Type of stream."]
34523 pub mavtype: VideoStreamType,
34524 #[doc = "Stream name."]
34525 #[cfg_attr(feature = "ts", ts(type = "string"))]
34526 pub name: CharArray<32>,
34527 #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
34528 #[cfg_attr(feature = "ts", ts(type = "string"))]
34529 pub uri: CharArray<160>,
34530 #[doc = "Encoding of stream."]
34531 #[cfg_attr(feature = "serde", serde(default))]
34532 pub encoding: VideoStreamEncoding,
34533 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
34534 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34535 pub camera_device_id: u8,
34536}
34537impl VIDEO_STREAM_INFORMATION_DATA {
34538 pub const ENCODED_LEN: usize = 215usize;
34539 pub const DEFAULT: Self = Self {
34540 framerate: 0.0_f32,
34541 bitrate: 0_u32,
34542 flags: VideoStreamStatusFlags::DEFAULT,
34543 resolution_h: 0_u16,
34544 resolution_v: 0_u16,
34545 rotation: 0_u16,
34546 hfov: 0_u16,
34547 stream_id: 0_u8,
34548 count: 0_u8,
34549 mavtype: VideoStreamType::DEFAULT,
34550 name: CharArray::new([0_u8; 32usize]),
34551 uri: CharArray::new([0_u8; 160usize]),
34552 encoding: VideoStreamEncoding::DEFAULT,
34553 camera_device_id: 0_u8,
34554 };
34555 #[cfg(feature = "arbitrary")]
34556 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34557 use arbitrary::{Arbitrary, Unstructured};
34558 let mut buf = [0u8; 1024];
34559 rng.fill_bytes(&mut buf);
34560 let mut unstructured = Unstructured::new(&buf);
34561 Self::arbitrary(&mut unstructured).unwrap_or_default()
34562 }
34563}
34564impl Default for VIDEO_STREAM_INFORMATION_DATA {
34565 fn default() -> Self {
34566 Self::DEFAULT.clone()
34567 }
34568}
34569impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
34570 type Message = MavMessage;
34571 const ID: u32 = 269u32;
34572 const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
34573 const EXTRA_CRC: u8 = 109u8;
34574 const ENCODED_LEN: usize = 215usize;
34575 fn deser(
34576 _version: MavlinkVersion,
34577 __input: &[u8],
34578 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34579 let avail_len = __input.len();
34580 let mut payload_buf = [0; Self::ENCODED_LEN];
34581 let mut buf = if avail_len < Self::ENCODED_LEN {
34582 payload_buf[0..avail_len].copy_from_slice(__input);
34583 Bytes::new(&payload_buf)
34584 } else {
34585 Bytes::new(__input)
34586 };
34587 let mut __struct = Self::default();
34588 __struct.framerate = buf.get_f32_le()?;
34589 __struct.bitrate = buf.get_u32_le()?;
34590 let tmp = buf.get_u16_le()?;
34591 __struct.flags =
34592 VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
34593 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34594 flag_type: "VideoStreamStatusFlags",
34595 value: tmp as u64,
34596 })?;
34597 __struct.resolution_h = buf.get_u16_le()?;
34598 __struct.resolution_v = buf.get_u16_le()?;
34599 __struct.rotation = buf.get_u16_le()?;
34600 __struct.hfov = buf.get_u16_le()?;
34601 __struct.stream_id = buf.get_u8()?;
34602 __struct.count = buf.get_u8()?;
34603 let tmp = buf.get_u8()?;
34604 __struct.mavtype =
34605 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34606 enum_type: "VideoStreamType",
34607 value: tmp as u64,
34608 })?;
34609 let mut tmp = [0_u8; 32usize];
34610 for v in &mut tmp {
34611 *v = buf.get_u8()?;
34612 }
34613 __struct.name = CharArray::new(tmp);
34614 let mut tmp = [0_u8; 160usize];
34615 for v in &mut tmp {
34616 *v = buf.get_u8()?;
34617 }
34618 __struct.uri = CharArray::new(tmp);
34619 let tmp = buf.get_u8()?;
34620 __struct.encoding =
34621 FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34622 enum_type: "VideoStreamEncoding",
34623 value: tmp as u64,
34624 })?;
34625 __struct.camera_device_id = buf.get_u8()?;
34626 Ok(__struct)
34627 }
34628 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34629 let mut __tmp = BytesMut::new(bytes);
34630 #[allow(clippy::absurd_extreme_comparisons)]
34631 #[allow(unused_comparisons)]
34632 if __tmp.remaining() < Self::ENCODED_LEN {
34633 panic!(
34634 "buffer is too small (need {} bytes, but got {})",
34635 Self::ENCODED_LEN,
34636 __tmp.remaining(),
34637 )
34638 }
34639 __tmp.put_f32_le(self.framerate);
34640 __tmp.put_u32_le(self.bitrate);
34641 __tmp.put_u16_le(self.flags.bits() as u16);
34642 __tmp.put_u16_le(self.resolution_h);
34643 __tmp.put_u16_le(self.resolution_v);
34644 __tmp.put_u16_le(self.rotation);
34645 __tmp.put_u16_le(self.hfov);
34646 __tmp.put_u8(self.stream_id);
34647 __tmp.put_u8(self.count);
34648 __tmp.put_u8(self.mavtype as u8);
34649 for val in &self.name {
34650 __tmp.put_u8(*val);
34651 }
34652 for val in &self.uri {
34653 __tmp.put_u8(*val);
34654 }
34655 if matches!(version, MavlinkVersion::V2) {
34656 __tmp.put_u8(self.encoding as u8);
34657 __tmp.put_u8(self.camera_device_id);
34658 let len = __tmp.len();
34659 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34660 } else {
34661 __tmp.len()
34662 }
34663 }
34664}
34665#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34666#[doc = ""]
34667#[doc = "ID: 270"]
34668#[derive(Debug, Clone, PartialEq)]
34669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34671#[cfg_attr(feature = "ts", derive(TS))]
34672#[cfg_attr(feature = "ts", ts(export))]
34673pub struct VIDEO_STREAM_STATUS_DATA {
34674 #[doc = "Frame rate"]
34675 pub framerate: f32,
34676 #[doc = "Bit rate"]
34677 pub bitrate: u32,
34678 #[doc = "Bitmap of stream status flags"]
34679 pub flags: VideoStreamStatusFlags,
34680 #[doc = "Horizontal resolution"]
34681 pub resolution_h: u16,
34682 #[doc = "Vertical resolution"]
34683 pub resolution_v: u16,
34684 #[doc = "Video image rotation clockwise"]
34685 pub rotation: u16,
34686 #[doc = "Horizontal Field of view"]
34687 pub hfov: u16,
34688 #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
34689 pub stream_id: u8,
34690 #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id)."]
34691 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34692 pub camera_device_id: u8,
34693}
34694impl VIDEO_STREAM_STATUS_DATA {
34695 pub const ENCODED_LEN: usize = 20usize;
34696 pub const DEFAULT: Self = Self {
34697 framerate: 0.0_f32,
34698 bitrate: 0_u32,
34699 flags: VideoStreamStatusFlags::DEFAULT,
34700 resolution_h: 0_u16,
34701 resolution_v: 0_u16,
34702 rotation: 0_u16,
34703 hfov: 0_u16,
34704 stream_id: 0_u8,
34705 camera_device_id: 0_u8,
34706 };
34707 #[cfg(feature = "arbitrary")]
34708 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34709 use arbitrary::{Arbitrary, Unstructured};
34710 let mut buf = [0u8; 1024];
34711 rng.fill_bytes(&mut buf);
34712 let mut unstructured = Unstructured::new(&buf);
34713 Self::arbitrary(&mut unstructured).unwrap_or_default()
34714 }
34715}
34716impl Default for VIDEO_STREAM_STATUS_DATA {
34717 fn default() -> Self {
34718 Self::DEFAULT.clone()
34719 }
34720}
34721impl MessageData for VIDEO_STREAM_STATUS_DATA {
34722 type Message = MavMessage;
34723 const ID: u32 = 270u32;
34724 const NAME: &'static str = "VIDEO_STREAM_STATUS";
34725 const EXTRA_CRC: u8 = 59u8;
34726 const ENCODED_LEN: usize = 20usize;
34727 fn deser(
34728 _version: MavlinkVersion,
34729 __input: &[u8],
34730 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34731 let avail_len = __input.len();
34732 let mut payload_buf = [0; Self::ENCODED_LEN];
34733 let mut buf = if avail_len < Self::ENCODED_LEN {
34734 payload_buf[0..avail_len].copy_from_slice(__input);
34735 Bytes::new(&payload_buf)
34736 } else {
34737 Bytes::new(__input)
34738 };
34739 let mut __struct = Self::default();
34740 __struct.framerate = buf.get_f32_le()?;
34741 __struct.bitrate = buf.get_u32_le()?;
34742 let tmp = buf.get_u16_le()?;
34743 __struct.flags =
34744 VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
34745 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34746 flag_type: "VideoStreamStatusFlags",
34747 value: tmp as u64,
34748 })?;
34749 __struct.resolution_h = buf.get_u16_le()?;
34750 __struct.resolution_v = buf.get_u16_le()?;
34751 __struct.rotation = buf.get_u16_le()?;
34752 __struct.hfov = buf.get_u16_le()?;
34753 __struct.stream_id = buf.get_u8()?;
34754 __struct.camera_device_id = buf.get_u8()?;
34755 Ok(__struct)
34756 }
34757 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34758 let mut __tmp = BytesMut::new(bytes);
34759 #[allow(clippy::absurd_extreme_comparisons)]
34760 #[allow(unused_comparisons)]
34761 if __tmp.remaining() < Self::ENCODED_LEN {
34762 panic!(
34763 "buffer is too small (need {} bytes, but got {})",
34764 Self::ENCODED_LEN,
34765 __tmp.remaining(),
34766 )
34767 }
34768 __tmp.put_f32_le(self.framerate);
34769 __tmp.put_u32_le(self.bitrate);
34770 __tmp.put_u16_le(self.flags.bits() as u16);
34771 __tmp.put_u16_le(self.resolution_h);
34772 __tmp.put_u16_le(self.resolution_v);
34773 __tmp.put_u16_le(self.rotation);
34774 __tmp.put_u16_le(self.hfov);
34775 __tmp.put_u8(self.stream_id);
34776 if matches!(version, MavlinkVersion::V2) {
34777 __tmp.put_u8(self.camera_device_id);
34778 let len = __tmp.len();
34779 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34780 } else {
34781 __tmp.len()
34782 }
34783 }
34784}
34785#[doc = "Local position/attitude estimate from a vision source."]
34786#[doc = ""]
34787#[doc = "ID: 102"]
34788#[derive(Debug, Clone, PartialEq)]
34789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34790#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34791#[cfg_attr(feature = "ts", derive(TS))]
34792#[cfg_attr(feature = "ts", ts(export))]
34793pub struct VISION_POSITION_ESTIMATE_DATA {
34794 #[doc = "Timestamp (UNIX time or time since system boot)"]
34795 pub usec: u64,
34796 #[doc = "Local X position"]
34797 pub x: f32,
34798 #[doc = "Local Y position"]
34799 pub y: f32,
34800 #[doc = "Local Z position"]
34801 pub z: f32,
34802 #[doc = "Roll angle"]
34803 pub roll: f32,
34804 #[doc = "Pitch angle"]
34805 pub pitch: f32,
34806 #[doc = "Yaw angle"]
34807 pub yaw: f32,
34808 #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
34809 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34810 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34811 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34812 pub covariance: [f32; 21],
34813 #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
34814 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34815 pub reset_counter: u8,
34816}
34817impl VISION_POSITION_ESTIMATE_DATA {
34818 pub const ENCODED_LEN: usize = 117usize;
34819 pub const DEFAULT: Self = Self {
34820 usec: 0_u64,
34821 x: 0.0_f32,
34822 y: 0.0_f32,
34823 z: 0.0_f32,
34824 roll: 0.0_f32,
34825 pitch: 0.0_f32,
34826 yaw: 0.0_f32,
34827 covariance: [0.0_f32; 21usize],
34828 reset_counter: 0_u8,
34829 };
34830 #[cfg(feature = "arbitrary")]
34831 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34832 use arbitrary::{Arbitrary, Unstructured};
34833 let mut buf = [0u8; 1024];
34834 rng.fill_bytes(&mut buf);
34835 let mut unstructured = Unstructured::new(&buf);
34836 Self::arbitrary(&mut unstructured).unwrap_or_default()
34837 }
34838}
34839impl Default for VISION_POSITION_ESTIMATE_DATA {
34840 fn default() -> Self {
34841 Self::DEFAULT.clone()
34842 }
34843}
34844impl MessageData for VISION_POSITION_ESTIMATE_DATA {
34845 type Message = MavMessage;
34846 const ID: u32 = 102u32;
34847 const NAME: &'static str = "VISION_POSITION_ESTIMATE";
34848 const EXTRA_CRC: u8 = 158u8;
34849 const ENCODED_LEN: usize = 117usize;
34850 fn deser(
34851 _version: MavlinkVersion,
34852 __input: &[u8],
34853 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34854 let avail_len = __input.len();
34855 let mut payload_buf = [0; Self::ENCODED_LEN];
34856 let mut buf = if avail_len < Self::ENCODED_LEN {
34857 payload_buf[0..avail_len].copy_from_slice(__input);
34858 Bytes::new(&payload_buf)
34859 } else {
34860 Bytes::new(__input)
34861 };
34862 let mut __struct = Self::default();
34863 __struct.usec = buf.get_u64_le()?;
34864 __struct.x = buf.get_f32_le()?;
34865 __struct.y = buf.get_f32_le()?;
34866 __struct.z = buf.get_f32_le()?;
34867 __struct.roll = buf.get_f32_le()?;
34868 __struct.pitch = buf.get_f32_le()?;
34869 __struct.yaw = buf.get_f32_le()?;
34870 for v in &mut __struct.covariance {
34871 let val = buf.get_f32_le()?;
34872 *v = val;
34873 }
34874 __struct.reset_counter = buf.get_u8()?;
34875 Ok(__struct)
34876 }
34877 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34878 let mut __tmp = BytesMut::new(bytes);
34879 #[allow(clippy::absurd_extreme_comparisons)]
34880 #[allow(unused_comparisons)]
34881 if __tmp.remaining() < Self::ENCODED_LEN {
34882 panic!(
34883 "buffer is too small (need {} bytes, but got {})",
34884 Self::ENCODED_LEN,
34885 __tmp.remaining(),
34886 )
34887 }
34888 __tmp.put_u64_le(self.usec);
34889 __tmp.put_f32_le(self.x);
34890 __tmp.put_f32_le(self.y);
34891 __tmp.put_f32_le(self.z);
34892 __tmp.put_f32_le(self.roll);
34893 __tmp.put_f32_le(self.pitch);
34894 __tmp.put_f32_le(self.yaw);
34895 if matches!(version, MavlinkVersion::V2) {
34896 for val in &self.covariance {
34897 __tmp.put_f32_le(*val);
34898 }
34899 __tmp.put_u8(self.reset_counter);
34900 let len = __tmp.len();
34901 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34902 } else {
34903 __tmp.len()
34904 }
34905 }
34906}
34907#[doc = "Speed estimate from a vision source."]
34908#[doc = ""]
34909#[doc = "ID: 103"]
34910#[derive(Debug, Clone, PartialEq)]
34911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34913#[cfg_attr(feature = "ts", derive(TS))]
34914#[cfg_attr(feature = "ts", ts(export))]
34915pub struct VISION_SPEED_ESTIMATE_DATA {
34916 #[doc = "Timestamp (UNIX time or time since system boot)"]
34917 pub usec: u64,
34918 #[doc = "Global X speed"]
34919 pub x: f32,
34920 #[doc = "Global Y speed"]
34921 pub y: f32,
34922 #[doc = "Global Z speed"]
34923 pub z: f32,
34924 #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
34925 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34926 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34927 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34928 pub covariance: [f32; 9],
34929 #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
34930 #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34931 pub reset_counter: u8,
34932}
34933impl VISION_SPEED_ESTIMATE_DATA {
34934 pub const ENCODED_LEN: usize = 57usize;
34935 pub const DEFAULT: Self = Self {
34936 usec: 0_u64,
34937 x: 0.0_f32,
34938 y: 0.0_f32,
34939 z: 0.0_f32,
34940 covariance: [0.0_f32; 9usize],
34941 reset_counter: 0_u8,
34942 };
34943 #[cfg(feature = "arbitrary")]
34944 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34945 use arbitrary::{Arbitrary, Unstructured};
34946 let mut buf = [0u8; 1024];
34947 rng.fill_bytes(&mut buf);
34948 let mut unstructured = Unstructured::new(&buf);
34949 Self::arbitrary(&mut unstructured).unwrap_or_default()
34950 }
34951}
34952impl Default for VISION_SPEED_ESTIMATE_DATA {
34953 fn default() -> Self {
34954 Self::DEFAULT.clone()
34955 }
34956}
34957impl MessageData for VISION_SPEED_ESTIMATE_DATA {
34958 type Message = MavMessage;
34959 const ID: u32 = 103u32;
34960 const NAME: &'static str = "VISION_SPEED_ESTIMATE";
34961 const EXTRA_CRC: u8 = 208u8;
34962 const ENCODED_LEN: usize = 57usize;
34963 fn deser(
34964 _version: MavlinkVersion,
34965 __input: &[u8],
34966 ) -> Result<Self, ::mavlink_core::error::ParserError> {
34967 let avail_len = __input.len();
34968 let mut payload_buf = [0; Self::ENCODED_LEN];
34969 let mut buf = if avail_len < Self::ENCODED_LEN {
34970 payload_buf[0..avail_len].copy_from_slice(__input);
34971 Bytes::new(&payload_buf)
34972 } else {
34973 Bytes::new(__input)
34974 };
34975 let mut __struct = Self::default();
34976 __struct.usec = buf.get_u64_le()?;
34977 __struct.x = buf.get_f32_le()?;
34978 __struct.y = buf.get_f32_le()?;
34979 __struct.z = buf.get_f32_le()?;
34980 for v in &mut __struct.covariance {
34981 let val = buf.get_f32_le()?;
34982 *v = val;
34983 }
34984 __struct.reset_counter = buf.get_u8()?;
34985 Ok(__struct)
34986 }
34987 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34988 let mut __tmp = BytesMut::new(bytes);
34989 #[allow(clippy::absurd_extreme_comparisons)]
34990 #[allow(unused_comparisons)]
34991 if __tmp.remaining() < Self::ENCODED_LEN {
34992 panic!(
34993 "buffer is too small (need {} bytes, but got {})",
34994 Self::ENCODED_LEN,
34995 __tmp.remaining(),
34996 )
34997 }
34998 __tmp.put_u64_le(self.usec);
34999 __tmp.put_f32_le(self.x);
35000 __tmp.put_f32_le(self.y);
35001 __tmp.put_f32_le(self.z);
35002 if matches!(version, MavlinkVersion::V2) {
35003 for val in &self.covariance {
35004 __tmp.put_f32_le(*val);
35005 }
35006 __tmp.put_u8(self.reset_counter);
35007 let len = __tmp.len();
35008 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35009 } else {
35010 __tmp.len()
35011 }
35012 }
35013}
35014#[doc = "Cumulative distance traveled for each reported wheel."]
35015#[doc = ""]
35016#[doc = "ID: 9000"]
35017#[derive(Debug, Clone, PartialEq)]
35018#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35019#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35020#[cfg_attr(feature = "ts", derive(TS))]
35021#[cfg_attr(feature = "ts", ts(export))]
35022pub struct WHEEL_DISTANCE_DATA {
35023 #[doc = "Timestamp (synced to UNIX time or since system boot)."]
35024 pub time_usec: u64,
35025 #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
35026 #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
35027 #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
35028 pub distance: [f64; 16],
35029 #[doc = "Number of wheels reported."]
35030 pub count: u8,
35031}
35032impl WHEEL_DISTANCE_DATA {
35033 pub const ENCODED_LEN: usize = 137usize;
35034 pub const DEFAULT: Self = Self {
35035 time_usec: 0_u64,
35036 distance: [0.0_f64; 16usize],
35037 count: 0_u8,
35038 };
35039 #[cfg(feature = "arbitrary")]
35040 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35041 use arbitrary::{Arbitrary, Unstructured};
35042 let mut buf = [0u8; 1024];
35043 rng.fill_bytes(&mut buf);
35044 let mut unstructured = Unstructured::new(&buf);
35045 Self::arbitrary(&mut unstructured).unwrap_or_default()
35046 }
35047}
35048impl Default for WHEEL_DISTANCE_DATA {
35049 fn default() -> Self {
35050 Self::DEFAULT.clone()
35051 }
35052}
35053impl MessageData for WHEEL_DISTANCE_DATA {
35054 type Message = MavMessage;
35055 const ID: u32 = 9000u32;
35056 const NAME: &'static str = "WHEEL_DISTANCE";
35057 const EXTRA_CRC: u8 = 113u8;
35058 const ENCODED_LEN: usize = 137usize;
35059 fn deser(
35060 _version: MavlinkVersion,
35061 __input: &[u8],
35062 ) -> Result<Self, ::mavlink_core::error::ParserError> {
35063 let avail_len = __input.len();
35064 let mut payload_buf = [0; Self::ENCODED_LEN];
35065 let mut buf = if avail_len < Self::ENCODED_LEN {
35066 payload_buf[0..avail_len].copy_from_slice(__input);
35067 Bytes::new(&payload_buf)
35068 } else {
35069 Bytes::new(__input)
35070 };
35071 let mut __struct = Self::default();
35072 __struct.time_usec = buf.get_u64_le()?;
35073 for v in &mut __struct.distance {
35074 let val = buf.get_f64_le()?;
35075 *v = val;
35076 }
35077 __struct.count = buf.get_u8()?;
35078 Ok(__struct)
35079 }
35080 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35081 let mut __tmp = BytesMut::new(bytes);
35082 #[allow(clippy::absurd_extreme_comparisons)]
35083 #[allow(unused_comparisons)]
35084 if __tmp.remaining() < Self::ENCODED_LEN {
35085 panic!(
35086 "buffer is too small (need {} bytes, but got {})",
35087 Self::ENCODED_LEN,
35088 __tmp.remaining(),
35089 )
35090 }
35091 __tmp.put_u64_le(self.time_usec);
35092 for val in &self.distance {
35093 __tmp.put_f64_le(*val);
35094 }
35095 __tmp.put_u8(self.count);
35096 if matches!(version, MavlinkVersion::V2) {
35097 let len = __tmp.len();
35098 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35099 } else {
35100 __tmp.len()
35101 }
35102 }
35103}
35104#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35105#[doc = ""]
35106#[doc = "ID: 299"]
35107#[derive(Debug, Clone, PartialEq)]
35108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35110#[cfg_attr(feature = "ts", derive(TS))]
35111#[cfg_attr(feature = "ts", ts(export))]
35112pub struct WIFI_CONFIG_AP_DATA {
35113 #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
35114 #[cfg_attr(feature = "ts", ts(type = "string"))]
35115 pub ssid: CharArray<32>,
35116 #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
35117 #[cfg_attr(feature = "ts", ts(type = "string"))]
35118 pub password: CharArray<64>,
35119 #[doc = "WiFi Mode."]
35120 #[cfg_attr(feature = "serde", serde(default))]
35121 pub mode: WifiConfigApMode,
35122 #[doc = "Message acceptance response (sent back to GS)."]
35123 #[cfg_attr(feature = "serde", serde(default))]
35124 pub response: WifiConfigApResponse,
35125}
35126impl WIFI_CONFIG_AP_DATA {
35127 pub const ENCODED_LEN: usize = 98usize;
35128 pub const DEFAULT: Self = Self {
35129 ssid: CharArray::new([0_u8; 32usize]),
35130 password: CharArray::new([0_u8; 64usize]),
35131 mode: WifiConfigApMode::DEFAULT,
35132 response: WifiConfigApResponse::DEFAULT,
35133 };
35134 #[cfg(feature = "arbitrary")]
35135 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35136 use arbitrary::{Arbitrary, Unstructured};
35137 let mut buf = [0u8; 1024];
35138 rng.fill_bytes(&mut buf);
35139 let mut unstructured = Unstructured::new(&buf);
35140 Self::arbitrary(&mut unstructured).unwrap_or_default()
35141 }
35142}
35143impl Default for WIFI_CONFIG_AP_DATA {
35144 fn default() -> Self {
35145 Self::DEFAULT.clone()
35146 }
35147}
35148impl MessageData for WIFI_CONFIG_AP_DATA {
35149 type Message = MavMessage;
35150 const ID: u32 = 299u32;
35151 const NAME: &'static str = "WIFI_CONFIG_AP";
35152 const EXTRA_CRC: u8 = 19u8;
35153 const ENCODED_LEN: usize = 98usize;
35154 fn deser(
35155 _version: MavlinkVersion,
35156 __input: &[u8],
35157 ) -> Result<Self, ::mavlink_core::error::ParserError> {
35158 let avail_len = __input.len();
35159 let mut payload_buf = [0; Self::ENCODED_LEN];
35160 let mut buf = if avail_len < Self::ENCODED_LEN {
35161 payload_buf[0..avail_len].copy_from_slice(__input);
35162 Bytes::new(&payload_buf)
35163 } else {
35164 Bytes::new(__input)
35165 };
35166 let mut __struct = Self::default();
35167 let mut tmp = [0_u8; 32usize];
35168 for v in &mut tmp {
35169 *v = buf.get_u8()?;
35170 }
35171 __struct.ssid = CharArray::new(tmp);
35172 let mut tmp = [0_u8; 64usize];
35173 for v in &mut tmp {
35174 *v = buf.get_u8()?;
35175 }
35176 __struct.password = CharArray::new(tmp);
35177 let tmp = buf.get_i8()?;
35178 __struct.mode =
35179 FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
35180 enum_type: "WifiConfigApMode",
35181 value: tmp as u64,
35182 })?;
35183 let tmp = buf.get_i8()?;
35184 __struct.response =
35185 FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
35186 enum_type: "WifiConfigApResponse",
35187 value: tmp as u64,
35188 })?;
35189 Ok(__struct)
35190 }
35191 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35192 let mut __tmp = BytesMut::new(bytes);
35193 #[allow(clippy::absurd_extreme_comparisons)]
35194 #[allow(unused_comparisons)]
35195 if __tmp.remaining() < Self::ENCODED_LEN {
35196 panic!(
35197 "buffer is too small (need {} bytes, but got {})",
35198 Self::ENCODED_LEN,
35199 __tmp.remaining(),
35200 )
35201 }
35202 for val in &self.ssid {
35203 __tmp.put_u8(*val);
35204 }
35205 for val in &self.password {
35206 __tmp.put_u8(*val);
35207 }
35208 if matches!(version, MavlinkVersion::V2) {
35209 __tmp.put_i8(self.mode as i8);
35210 __tmp.put_i8(self.response as i8);
35211 let len = __tmp.len();
35212 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35213 } else {
35214 __tmp.len()
35215 }
35216 }
35217}
35218#[doc = "Winch status."]
35219#[doc = ""]
35220#[doc = "ID: 9005"]
35221#[derive(Debug, Clone, PartialEq)]
35222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35224#[cfg_attr(feature = "ts", derive(TS))]
35225#[cfg_attr(feature = "ts", ts(export))]
35226pub struct WINCH_STATUS_DATA {
35227 #[doc = "Timestamp (synced to UNIX time or since system boot)."]
35228 pub time_usec: u64,
35229 #[doc = "Length of line released. NaN if unknown"]
35230 pub line_length: f32,
35231 #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
35232 pub speed: f32,
35233 #[doc = "Tension on the line. NaN if unknown"]
35234 pub tension: f32,
35235 #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
35236 pub voltage: f32,
35237 #[doc = "Current draw from the winch. NaN if unknown"]
35238 pub current: f32,
35239 #[doc = "Status flags"]
35240 pub status: MavWinchStatusFlag,
35241 #[doc = "Temperature of the motor. INT16_MAX if unknown"]
35242 pub temperature: i16,
35243}
35244impl WINCH_STATUS_DATA {
35245 pub const ENCODED_LEN: usize = 34usize;
35246 pub const DEFAULT: Self = Self {
35247 time_usec: 0_u64,
35248 line_length: 0.0_f32,
35249 speed: 0.0_f32,
35250 tension: 0.0_f32,
35251 voltage: 0.0_f32,
35252 current: 0.0_f32,
35253 status: MavWinchStatusFlag::DEFAULT,
35254 temperature: 0_i16,
35255 };
35256 #[cfg(feature = "arbitrary")]
35257 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35258 use arbitrary::{Arbitrary, Unstructured};
35259 let mut buf = [0u8; 1024];
35260 rng.fill_bytes(&mut buf);
35261 let mut unstructured = Unstructured::new(&buf);
35262 Self::arbitrary(&mut unstructured).unwrap_or_default()
35263 }
35264}
35265impl Default for WINCH_STATUS_DATA {
35266 fn default() -> Self {
35267 Self::DEFAULT.clone()
35268 }
35269}
35270impl MessageData for WINCH_STATUS_DATA {
35271 type Message = MavMessage;
35272 const ID: u32 = 9005u32;
35273 const NAME: &'static str = "WINCH_STATUS";
35274 const EXTRA_CRC: u8 = 117u8;
35275 const ENCODED_LEN: usize = 34usize;
35276 fn deser(
35277 _version: MavlinkVersion,
35278 __input: &[u8],
35279 ) -> Result<Self, ::mavlink_core::error::ParserError> {
35280 let avail_len = __input.len();
35281 let mut payload_buf = [0; Self::ENCODED_LEN];
35282 let mut buf = if avail_len < Self::ENCODED_LEN {
35283 payload_buf[0..avail_len].copy_from_slice(__input);
35284 Bytes::new(&payload_buf)
35285 } else {
35286 Bytes::new(__input)
35287 };
35288 let mut __struct = Self::default();
35289 __struct.time_usec = buf.get_u64_le()?;
35290 __struct.line_length = buf.get_f32_le()?;
35291 __struct.speed = buf.get_f32_le()?;
35292 __struct.tension = buf.get_f32_le()?;
35293 __struct.voltage = buf.get_f32_le()?;
35294 __struct.current = buf.get_f32_le()?;
35295 let tmp = buf.get_u32_le()?;
35296 __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
35297 .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
35298 flag_type: "MavWinchStatusFlag",
35299 value: tmp as u64,
35300 })?;
35301 __struct.temperature = buf.get_i16_le()?;
35302 Ok(__struct)
35303 }
35304 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35305 let mut __tmp = BytesMut::new(bytes);
35306 #[allow(clippy::absurd_extreme_comparisons)]
35307 #[allow(unused_comparisons)]
35308 if __tmp.remaining() < Self::ENCODED_LEN {
35309 panic!(
35310 "buffer is too small (need {} bytes, but got {})",
35311 Self::ENCODED_LEN,
35312 __tmp.remaining(),
35313 )
35314 }
35315 __tmp.put_u64_le(self.time_usec);
35316 __tmp.put_f32_le(self.line_length);
35317 __tmp.put_f32_le(self.speed);
35318 __tmp.put_f32_le(self.tension);
35319 __tmp.put_f32_le(self.voltage);
35320 __tmp.put_f32_le(self.current);
35321 __tmp.put_u32_le(self.status.bits() as u32);
35322 __tmp.put_i16_le(self.temperature);
35323 if matches!(version, MavlinkVersion::V2) {
35324 let len = __tmp.len();
35325 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35326 } else {
35327 __tmp.len()
35328 }
35329 }
35330}
35331#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
35332#[doc = ""]
35333#[doc = "ID: 231"]
35334#[derive(Debug, Clone, PartialEq)]
35335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35337#[cfg_attr(feature = "ts", derive(TS))]
35338#[cfg_attr(feature = "ts", ts(export))]
35339pub struct WIND_COV_DATA {
35340 #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
35341 pub time_usec: u64,
35342 #[doc = "Wind in North (NED) direction (NAN if unknown)"]
35343 pub wind_x: f32,
35344 #[doc = "Wind in East (NED) direction (NAN if unknown)"]
35345 pub wind_y: f32,
35346 #[doc = "Wind in down (NED) direction (NAN if unknown)"]
35347 pub wind_z: f32,
35348 #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
35349 pub var_horiz: f32,
35350 #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
35351 pub var_vert: f32,
35352 #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
35353 pub wind_alt: f32,
35354 #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
35355 pub horiz_accuracy: f32,
35356 #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
35357 pub vert_accuracy: f32,
35358}
35359impl WIND_COV_DATA {
35360 pub const ENCODED_LEN: usize = 40usize;
35361 pub const DEFAULT: Self = Self {
35362 time_usec: 0_u64,
35363 wind_x: 0.0_f32,
35364 wind_y: 0.0_f32,
35365 wind_z: 0.0_f32,
35366 var_horiz: 0.0_f32,
35367 var_vert: 0.0_f32,
35368 wind_alt: 0.0_f32,
35369 horiz_accuracy: 0.0_f32,
35370 vert_accuracy: 0.0_f32,
35371 };
35372 #[cfg(feature = "arbitrary")]
35373 pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
35374 use arbitrary::{Arbitrary, Unstructured};
35375 let mut buf = [0u8; 1024];
35376 rng.fill_bytes(&mut buf);
35377 let mut unstructured = Unstructured::new(&buf);
35378 Self::arbitrary(&mut unstructured).unwrap_or_default()
35379 }
35380}
35381impl Default for WIND_COV_DATA {
35382 fn default() -> Self {
35383 Self::DEFAULT.clone()
35384 }
35385}
35386impl MessageData for WIND_COV_DATA {
35387 type Message = MavMessage;
35388 const ID: u32 = 231u32;
35389 const NAME: &'static str = "WIND_COV";
35390 const EXTRA_CRC: u8 = 105u8;
35391 const ENCODED_LEN: usize = 40usize;
35392 fn deser(
35393 _version: MavlinkVersion,
35394 __input: &[u8],
35395 ) -> Result<Self, ::mavlink_core::error::ParserError> {
35396 let avail_len = __input.len();
35397 let mut payload_buf = [0; Self::ENCODED_LEN];
35398 let mut buf = if avail_len < Self::ENCODED_LEN {
35399 payload_buf[0..avail_len].copy_from_slice(__input);
35400 Bytes::new(&payload_buf)
35401 } else {
35402 Bytes::new(__input)
35403 };
35404 let mut __struct = Self::default();
35405 __struct.time_usec = buf.get_u64_le()?;
35406 __struct.wind_x = buf.get_f32_le()?;
35407 __struct.wind_y = buf.get_f32_le()?;
35408 __struct.wind_z = buf.get_f32_le()?;
35409 __struct.var_horiz = buf.get_f32_le()?;
35410 __struct.var_vert = buf.get_f32_le()?;
35411 __struct.wind_alt = buf.get_f32_le()?;
35412 __struct.horiz_accuracy = buf.get_f32_le()?;
35413 __struct.vert_accuracy = buf.get_f32_le()?;
35414 Ok(__struct)
35415 }
35416 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
35417 let mut __tmp = BytesMut::new(bytes);
35418 #[allow(clippy::absurd_extreme_comparisons)]
35419 #[allow(unused_comparisons)]
35420 if __tmp.remaining() < Self::ENCODED_LEN {
35421 panic!(
35422 "buffer is too small (need {} bytes, but got {})",
35423 Self::ENCODED_LEN,
35424 __tmp.remaining(),
35425 )
35426 }
35427 __tmp.put_u64_le(self.time_usec);
35428 __tmp.put_f32_le(self.wind_x);
35429 __tmp.put_f32_le(self.wind_y);
35430 __tmp.put_f32_le(self.wind_z);
35431 __tmp.put_f32_le(self.var_horiz);
35432 __tmp.put_f32_le(self.var_vert);
35433 __tmp.put_f32_le(self.wind_alt);
35434 __tmp.put_f32_le(self.horiz_accuracy);
35435 __tmp.put_f32_le(self.vert_accuracy);
35436 if matches!(version, MavlinkVersion::V2) {
35437 let len = __tmp.len();
35438 ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
35439 } else {
35440 __tmp.len()
35441 }
35442 }
35443}
35444#[derive(Clone, PartialEq, Debug)]
35445#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
35446#[cfg_attr(feature = "serde", serde(tag = "type"))]
35447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
35448#[cfg_attr(feature = "ts", derive(TS))]
35449#[cfg_attr(feature = "ts", ts(export))]
35450#[repr(u32)]
35451pub enum MavMessage {
35452 #[doc = "Set the vehicle attitude and body angular rates."]
35453 #[doc = ""]
35454 #[doc = "ID: 140"]
35455 ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
35456 #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
35457 #[doc = ""]
35458 #[doc = "ID: 375"]
35459 ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
35460 #[doc = "The location and information of an ADSB vehicle."]
35461 #[doc = ""]
35462 #[doc = "ID: 246"]
35463 ADSB_VEHICLE(ADSB_VEHICLE_DATA),
35464 #[doc = "Airspeed information from a sensor."]
35465 #[doc = ""]
35466 #[doc = "ID: 295"]
35467 AIRSPEED(AIRSPEED_DATA),
35468 #[doc = "The location and information of an AIS vessel."]
35469 #[doc = ""]
35470 #[doc = "ID: 301"]
35471 AIS_VESSEL(AIS_VESSEL_DATA),
35472 #[doc = "The current system altitude."]
35473 #[doc = ""]
35474 #[doc = "ID: 141"]
35475 ALTITUDE(ALTITUDE_DATA),
35476 #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
35477 #[doc = ""]
35478 #[doc = "ID: 30"]
35479 ATTITUDE(ATTITUDE_DATA),
35480 #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
35481 #[doc = ""]
35482 #[doc = "ID: 31"]
35483 ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
35484 #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
35485 #[doc = ""]
35486 #[doc = "ID: 61"]
35487 ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
35488 #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
35489 #[doc = ""]
35490 #[doc = "ID: 83"]
35491 ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
35492 #[doc = "Motion capture attitude and position."]
35493 #[doc = ""]
35494 #[doc = "ID: 138"]
35495 ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
35496 #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
35497 #[doc = ""]
35498 #[doc = "ID: 7"]
35499 AUTH_KEY(AUTH_KEY_DATA),
35500 #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
35501 #[doc = ""]
35502 #[doc = "ID: 286"]
35503 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
35504 #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
35505 #[doc = ""]
35506 #[doc = "ID: 148"]
35507 AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
35508 #[doc = "Information about a flight mode. The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE. Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode. The modes must be available/settable for the current vehicle/frame type. Each mode should only be emitted once (even if it is both standard and custom). Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed. See <https://mavlink.io/en/services/standard_modes.html>."]
35509 #[doc = ""]
35510 #[doc = "ID: 435"]
35511 AVAILABLE_MODES(AVAILABLE_MODES_DATA),
35512 #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed. A receiver must re-request all available modes whenever the sequence number changes. This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change. See <https://mavlink.io/en/services/standard_modes.html>."]
35513 #[doc = ""]
35514 #[doc = "ID: 437"]
35515 AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
35516 #[doc = "Battery information that is static, or requires infrequent update. This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate. BATTERY_STATUS_V2 is used for higher-rate battery status information."]
35517 #[doc = ""]
35518 #[doc = "ID: 372"]
35519 BATTERY_INFO(BATTERY_INFO_DATA),
35520 #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
35521 #[doc = ""]
35522 #[doc = "ID: 147"]
35523 BATTERY_STATUS(BATTERY_STATUS_DATA),
35524 #[doc = "Report button state change."]
35525 #[doc = ""]
35526 #[doc = "ID: 257"]
35527 BUTTON_CHANGE(BUTTON_CHANGE_DATA),
35528 #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
35529 #[doc = ""]
35530 #[doc = "ID: 262"]
35531 CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
35532 #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
35533 #[doc = ""]
35534 #[doc = "ID: 271"]
35535 CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
35536 #[doc = "Information about a captured image. This is emitted every time a message is captured. MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers: MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers. MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send: set to 0 (default) to send just the the message for the sequence number in param 2, set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers, set to the sequence number of the final message in the range."]
35537 #[doc = ""]
35538 #[doc = "ID: 263"]
35539 CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
35540 #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
35541 #[doc = ""]
35542 #[doc = "ID: 259"]
35543 CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
35544 #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
35545 #[doc = ""]
35546 #[doc = "ID: 260"]
35547 CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
35548 #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
35549 #[doc = ""]
35550 #[doc = "ID: 277"]
35551 CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
35552 #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
35553 #[doc = ""]
35554 #[doc = "ID: 276"]
35555 CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
35556 #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
35557 #[doc = ""]
35558 #[doc = "ID: 275"]
35559 CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
35560 #[doc = "Camera-IMU triggering and synchronisation message."]
35561 #[doc = ""]
35562 #[doc = "ID: 112"]
35563 CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
35564 #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
35565 #[doc = ""]
35566 #[doc = "ID: 387"]
35567 CANFD_FRAME(CANFD_FRAME_DATA),
35568 #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
35569 #[doc = ""]
35570 #[doc = "ID: 388"]
35571 CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
35572 #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
35573 #[doc = ""]
35574 #[doc = "ID: 386"]
35575 CAN_FRAME(CAN_FRAME_DATA),
35576 #[doc = "Configure cellular modems. This message is re-emitted as an acknowledgement by the modem. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35577 #[doc = ""]
35578 #[doc = "ID: 336"]
35579 CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
35580 #[doc = "Report current used cellular network status."]
35581 #[doc = ""]
35582 #[doc = "ID: 334"]
35583 CELLULAR_STATUS(CELLULAR_STATUS_DATA),
35584 #[doc = "Request to control this MAV."]
35585 #[doc = ""]
35586 #[doc = "ID: 5"]
35587 CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
35588 #[doc = "Accept / deny control of this MAV."]
35589 #[doc = ""]
35590 #[doc = "ID: 6"]
35591 CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
35592 #[doc = "Information about a potential collision."]
35593 #[doc = ""]
35594 #[doc = "ID: 247"]
35595 COLLISION(COLLISION_DATA),
35596 #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
35597 #[doc = ""]
35598 #[doc = "ID: 77"]
35599 COMMAND_ACK(COMMAND_ACK_DATA),
35600 #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
35601 #[doc = ""]
35602 #[doc = "ID: 80"]
35603 COMMAND_CANCEL(COMMAND_CANCEL_DATA),
35604 #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
35605 #[doc = ""]
35606 #[doc = "ID: 75"]
35607 COMMAND_INT(COMMAND_INT_DATA),
35608 #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
35609 #[doc = ""]
35610 #[doc = "ID: 76"]
35611 COMMAND_LONG(COMMAND_LONG_DATA),
35612 #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
35613 #[doc = ""]
35614 #[doc = "ID: 395"]
35615 #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
35616 COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
35617 #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
35618 #[doc = ""]
35619 #[doc = "ID: 396"]
35620 COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
35621 #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE. This contains the MAVLink FTP URI and CRC for the component's general metadata file. The file must be hosted on the component, and may be xz compressed. The file CRC can be used for file caching. The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet. For more information see: <https://mavlink.io/en/services/component_information.html>. Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
35622 #[doc = ""]
35623 #[doc = "ID: 397"]
35624 COMPONENT_METADATA(COMPONENT_METADATA_DATA),
35625 #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
35626 #[doc = ""]
35627 #[doc = "ID: 146"]
35628 CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
35629 #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
35630 #[doc = ""]
35631 #[doc = "ID: 411"]
35632 CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
35633 #[doc = "Get the current mode. This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz). It may be requested using MAV_CMD_REQUEST_MESSAGE. See <https://mavlink.io/en/services/standard_modes.html>."]
35634 #[doc = ""]
35635 #[doc = "ID: 436"]
35636 CURRENT_MODE(CURRENT_MODE_DATA),
35637 #[doc = "Data stream status information."]
35638 #[doc = ""]
35639 #[doc = "ID: 67"]
35640 #[deprecated = " See `MESSAGE_INTERVAL` (Superseded since 2015-08)"]
35641 DATA_STREAM(DATA_STREAM_DATA),
35642 #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
35643 #[doc = ""]
35644 #[doc = "ID: 130"]
35645 DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
35646 #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
35647 #[doc = ""]
35648 #[doc = "ID: 254"]
35649 DEBUG(DEBUG_DATA),
35650 #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
35651 #[doc = ""]
35652 #[doc = "ID: 350"]
35653 DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
35654 #[doc = "To debug something using a named 3D vector."]
35655 #[doc = ""]
35656 #[doc = "ID: 250"]
35657 DEBUG_VECT(DEBUG_VECT_DATA),
35658 #[doc = "Distance sensor information for an onboard rangefinder."]
35659 #[doc = ""]
35660 #[doc = "ID: 132"]
35661 DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
35662 #[doc = "EFI status output."]
35663 #[doc = ""]
35664 #[doc = "ID: 225"]
35665 EFI_STATUS(EFI_STATUS_DATA),
35666 #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
35667 #[doc = ""]
35668 #[doc = "ID: 131"]
35669 ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
35670 #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
35671 #[doc = ""]
35672 #[doc = "ID: 290"]
35673 ESC_INFO(ESC_INFO_DATA),
35674 #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
35675 #[doc = ""]
35676 #[doc = "ID: 291"]
35677 ESC_STATUS(ESC_STATUS_DATA),
35678 #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
35679 #[doc = ""]
35680 #[doc = "ID: 230"]
35681 ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
35682 #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
35683 #[doc = ""]
35684 #[doc = "ID: 410"]
35685 EVENT(EVENT_DATA),
35686 #[doc = "Provides state for additional features."]
35687 #[doc = ""]
35688 #[doc = "ID: 245"]
35689 EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
35690 #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
35691 #[doc = ""]
35692 #[doc = "ID: 162"]
35693 FENCE_STATUS(FENCE_STATUS_DATA),
35694 #[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT). This may typically send at low rates: of the order of 2Hz."]
35695 #[doc = ""]
35696 #[doc = "ID: 361"]
35697 FIGURE_EIGHT_EXECUTION_STATUS(FIGURE_EIGHT_EXECUTION_STATUS_DATA),
35698 #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
35699 #[doc = ""]
35700 #[doc = "ID: 110"]
35701 FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
35702 #[doc = "Flight information. This includes time since boot for arm, takeoff, and land, and a flight number. Takeoff and landing values reset to zero on arm. This can be requested using MAV_CMD_REQUEST_MESSAGE. Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
35703 #[doc = ""]
35704 #[doc = "ID: 264"]
35705 FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
35706 #[doc = "Current motion information from a designated system."]
35707 #[doc = ""]
35708 #[doc = "ID: 144"]
35709 FOLLOW_TARGET(FOLLOW_TARGET_DATA),
35710 #[doc = "Fuel status. This message provides \"generic\" fuel level information for in a GCS and for triggering failsafes in an autopilot. The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE. The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value. A recipient can assume that if these fields are supplied they are accurate. If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume). Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot). This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2. If both messages are sent for the same fuel system, the ids and corresponding information must match. This should be streamed (nominally at 0.1 Hz)."]
35711 #[doc = ""]
35712 #[doc = "ID: 371"]
35713 FUEL_STATUS(FUEL_STATUS_DATA),
35714 #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
35715 #[doc = ""]
35716 #[doc = "ID: 373"]
35717 GENERATOR_STATUS(GENERATOR_STATUS_DATA),
35718 #[doc = "Message reporting the status of a gimbal device. \t This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t For the angles encoded in the quaternion and the angular velocities holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t If neither of these flags are set, then (for backwards compatibility) it holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t else they are relative to the vehicle heading (vehicle frame). \t Other conditions of the flags are not allowed. \t The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
35719 #[doc = ""]
35720 #[doc = "ID: 285"]
35721 GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
35722 #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
35723 #[doc = ""]
35724 #[doc = "ID: 283"]
35725 GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
35726 #[doc = "Low level message to control a gimbal device's attitude. \t This message is to be sent from the gimbal manager to the gimbal device component. \t The quaternion and angular velocities can be set to NaN according to use case. \t For the angles encoded in the quaternion and the angular velocities holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t If neither of these flags are set, then (for backwards compatibility) it holds: \t If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t else they are relative to the vehicle heading (vehicle frame). \t Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t These rules are to ensure backwards compatibility. \t New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
35727 #[doc = ""]
35728 #[doc = "ID: 284"]
35729 GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
35730 #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
35731 #[doc = ""]
35732 #[doc = "ID: 280"]
35733 GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
35734 #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
35735 #[doc = ""]
35736 #[doc = "ID: 282"]
35737 GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
35738 #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
35739 #[doc = ""]
35740 #[doc = "ID: 288"]
35741 GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
35742 #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
35743 #[doc = ""]
35744 #[doc = "ID: 287"]
35745 GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
35746 #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
35747 #[doc = ""]
35748 #[doc = "ID: 281"]
35749 GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
35750 #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient."]
35751 #[doc = ""]
35752 #[doc = "ID: 33"]
35753 GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
35754 #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
35755 #[doc = ""]
35756 #[doc = "ID: 63"]
35757 GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
35758 #[doc = "Global position/attitude estimate from a vision source."]
35759 #[doc = ""]
35760 #[doc = "ID: 101"]
35761 GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
35762 #[doc = "Second GPS data."]
35763 #[doc = ""]
35764 #[doc = "ID: 124"]
35765 GPS2_RAW(GPS2_RAW_DATA),
35766 #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
35767 #[doc = ""]
35768 #[doc = "ID: 128"]
35769 GPS2_RTK(GPS2_RTK_DATA),
35770 #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
35771 #[doc = ""]
35772 #[doc = "ID: 49"]
35773 GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
35774 #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
35775 #[doc = ""]
35776 #[doc = "ID: 123"]
35777 #[deprecated = " See `GPS_RTCM_DATA` (Superseded since 2022-05)"]
35778 GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
35779 #[doc = "GPS sensor input message. This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
35780 #[doc = ""]
35781 #[doc = "ID: 232"]
35782 GPS_INPUT(GPS_INPUT_DATA),
35783 #[doc = "The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
35784 #[doc = ""]
35785 #[doc = "ID: 24"]
35786 GPS_RAW_INT(GPS_RAW_INT_DATA),
35787 #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
35788 #[doc = ""]
35789 #[doc = "ID: 233"]
35790 GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
35791 #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
35792 #[doc = ""]
35793 #[doc = "ID: 127"]
35794 GPS_RTK(GPS_RTK_DATA),
35795 #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
35796 #[doc = ""]
35797 #[doc = "ID: 25"]
35798 GPS_STATUS(GPS_STATUS_DATA),
35799 #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
35800 #[doc = ""]
35801 #[doc = "ID: 0"]
35802 HEARTBEAT(HEARTBEAT_DATA),
35803 #[doc = "The IMU readings in SI units in NED body frame."]
35804 #[doc = ""]
35805 #[doc = "ID: 105"]
35806 HIGHRES_IMU(HIGHRES_IMU_DATA),
35807 #[doc = "Message appropriate for high latency connections like Iridium."]
35808 #[doc = ""]
35809 #[doc = "ID: 234"]
35810 #[deprecated = " See `HIGH_LATENCY2` (Superseded since 2020-10)"]
35811 HIGH_LATENCY(HIGH_LATENCY_DATA),
35812 #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
35813 #[doc = ""]
35814 #[doc = "ID: 235"]
35815 HIGH_LATENCY2(HIGH_LATENCY2_DATA),
35816 #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
35817 #[doc = ""]
35818 #[doc = "ID: 93"]
35819 HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
35820 #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
35821 #[doc = ""]
35822 #[doc = "ID: 91"]
35823 HIL_CONTROLS(HIL_CONTROLS_DATA),
35824 #[doc = "The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
35825 #[doc = ""]
35826 #[doc = "ID: 113"]
35827 HIL_GPS(HIL_GPS_DATA),
35828 #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
35829 #[doc = ""]
35830 #[doc = "ID: 114"]
35831 HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
35832 #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
35833 #[doc = ""]
35834 #[doc = "ID: 92"]
35835 HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
35836 #[doc = "The IMU readings in SI units in NED body frame."]
35837 #[doc = ""]
35838 #[doc = "ID: 107"]
35839 HIL_SENSOR(HIL_SENSOR_DATA),
35840 #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
35841 #[doc = ""]
35842 #[doc = "ID: 90"]
35843 #[deprecated = " See `HIL_STATE_QUATERNION` (Superseded since 2013-07)"]
35844 HIL_STATE(HIL_STATE_DATA),
35845 #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
35846 #[doc = ""]
35847 #[doc = "ID: 115"]
35848 HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
35849 #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
35850 #[doc = ""]
35851 #[doc = "ID: 242"]
35852 HOME_POSITION(HOME_POSITION_DATA),
35853 #[doc = "Temperature and humidity from hygrometer."]
35854 #[doc = ""]
35855 #[doc = "ID: 12920"]
35856 HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
35857 #[doc = "Illuminator status."]
35858 #[doc = ""]
35859 #[doc = "ID: 440"]
35860 ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
35861 #[doc = "Status of the Iridium SBD link."]
35862 #[doc = ""]
35863 #[doc = "ID: 335"]
35864 ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
35865 #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
35866 #[doc = ""]
35867 #[doc = "ID: 149"]
35868 LANDING_TARGET(LANDING_TARGET_DATA),
35869 #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
35870 #[doc = ""]
35871 #[doc = "ID: 8"]
35872 LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
35873 #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
35874 #[doc = ""]
35875 #[doc = "ID: 32"]
35876 LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
35877 #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
35878 #[doc = ""]
35879 #[doc = "ID: 64"]
35880 LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
35881 #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
35882 #[doc = ""]
35883 #[doc = "ID: 89"]
35884 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
35885 #[doc = "An ack for a LOGGING_DATA_ACKED message."]
35886 #[doc = ""]
35887 #[doc = "ID: 268"]
35888 LOGGING_ACK(LOGGING_ACK_DATA),
35889 #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
35890 #[doc = ""]
35891 #[doc = "ID: 266"]
35892 LOGGING_DATA(LOGGING_DATA_DATA),
35893 #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
35894 #[doc = ""]
35895 #[doc = "ID: 267"]
35896 LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
35897 #[doc = "Reply to LOG_REQUEST_DATA."]
35898 #[doc = ""]
35899 #[doc = "ID: 120"]
35900 LOG_DATA(LOG_DATA_DATA),
35901 #[doc = "Reply to LOG_REQUEST_LIST."]
35902 #[doc = ""]
35903 #[doc = "ID: 118"]
35904 LOG_ENTRY(LOG_ENTRY_DATA),
35905 #[doc = "Erase all logs."]
35906 #[doc = ""]
35907 #[doc = "ID: 121"]
35908 LOG_ERASE(LOG_ERASE_DATA),
35909 #[doc = "Request a chunk of a log."]
35910 #[doc = ""]
35911 #[doc = "ID: 119"]
35912 LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
35913 #[doc = "Stop log transfer and resume normal logging."]
35914 #[doc = ""]
35915 #[doc = "ID: 122"]
35916 LOG_REQUEST_END(LOG_REQUEST_END_DATA),
35917 #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
35918 #[doc = ""]
35919 #[doc = "ID: 117"]
35920 LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
35921 #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
35922 #[doc = ""]
35923 #[doc = "ID: 192"]
35924 MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
35925 #[doc = "Manual (joystick) control message. This message represents movement axes and button using standard joystick axes nomenclature. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask. For more information see <https://mavlink.io/en/manual_control.html>."]
35926 #[doc = ""]
35927 #[doc = "ID: 69"]
35928 MANUAL_CONTROL(MANUAL_CONTROL_DATA),
35929 #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
35930 #[doc = ""]
35931 #[doc = "ID: 81"]
35932 MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
35933 #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
35934 #[doc = ""]
35935 #[doc = "ID: 249"]
35936 MEMORY_VECT(MEMORY_VECT_DATA),
35937 #[doc = "The interval between messages for a particular MAVLink message ID. This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
35938 #[doc = ""]
35939 #[doc = "ID: 244"]
35940 MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
35941 #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
35942 #[doc = ""]
35943 #[doc = "ID: 47"]
35944 MISSION_ACK(MISSION_ACK_DATA),
35945 #[doc = "Delete all mission items at once."]
35946 #[doc = ""]
35947 #[doc = "ID: 45"]
35948 MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
35949 #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
35950 #[doc = ""]
35951 #[doc = "ID: 44"]
35952 MISSION_COUNT(MISSION_COUNT_DATA),
35953 #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running). This message should be streamed all the time (nominally at 1Hz). This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
35954 #[doc = ""]
35955 #[doc = "ID: 42"]
35956 MISSION_CURRENT(MISSION_CURRENT_DATA),
35957 #[doc = "Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
35958 #[doc = ""]
35959 #[doc = "ID: 39"]
35960 #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
35961 MISSION_ITEM(MISSION_ITEM_DATA),
35962 #[doc = "Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
35963 #[doc = ""]
35964 #[doc = "ID: 73"]
35965 MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
35966 #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
35967 #[doc = ""]
35968 #[doc = "ID: 46"]
35969 MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
35970 #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
35971 #[doc = ""]
35972 #[doc = "ID: 40"]
35973 #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
35974 MISSION_REQUEST(MISSION_REQUEST_DATA),
35975 #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
35976 #[doc = ""]
35977 #[doc = "ID: 51"]
35978 MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
35979 #[doc = "Request the overall list of mission items from the system/component."]
35980 #[doc = ""]
35981 #[doc = "ID: 43"]
35982 MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
35983 #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
35984 #[doc = ""]
35985 #[doc = "ID: 37"]
35986 MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
35987 #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed). If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2). This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE. If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission. If the system is not in mission mode this message must not trigger a switch to mission mode."]
35988 #[doc = ""]
35989 #[doc = "ID: 41"]
35990 #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Superseded since 2022-08)"]
35991 MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
35992 #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
35993 #[doc = ""]
35994 #[doc = "ID: 38"]
35995 MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
35996 #[doc = "Orientation of a mount."]
35997 #[doc = ""]
35998 #[doc = "ID: 265"]
35999 #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Superseded since 2020-01)"]
36000 MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
36001 #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
36002 #[doc = ""]
36003 #[doc = "ID: 251"]
36004 NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
36005 #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
36006 #[doc = ""]
36007 #[doc = "ID: 252"]
36008 NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
36009 #[doc = "The state of the navigation and position controller."]
36010 #[doc = ""]
36011 #[doc = "ID: 62"]
36012 NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
36013 #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
36014 #[doc = ""]
36015 #[doc = "ID: 330"]
36016 OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
36017 #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
36018 #[doc = ""]
36019 #[doc = "ID: 331"]
36020 ODOMETRY(ODOMETRY_DATA),
36021 #[doc = "Hardware status sent by an onboard computer."]
36022 #[doc = ""]
36023 #[doc = "ID: 390"]
36024 ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
36025 #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
36026 #[doc = ""]
36027 #[doc = "ID: 12918"]
36028 OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
36029 #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
36030 #[doc = ""]
36031 #[doc = "ID: 12902"]
36032 OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
36033 #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
36034 #[doc = ""]
36035 #[doc = "ID: 12900"]
36036 OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
36037 #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
36038 #[doc = ""]
36039 #[doc = "ID: 12901"]
36040 OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
36041 #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
36042 #[doc = ""]
36043 #[doc = "ID: 12915"]
36044 OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
36045 #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
36046 #[doc = ""]
36047 #[doc = "ID: 12905"]
36048 OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
36049 #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
36050 #[doc = ""]
36051 #[doc = "ID: 12903"]
36052 OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
36053 #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
36054 #[doc = ""]
36055 #[doc = "ID: 12904"]
36056 OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
36057 #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
36058 #[doc = ""]
36059 #[doc = "ID: 12919"]
36060 OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
36061 #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
36062 #[doc = ""]
36063 #[doc = "ID: 100"]
36064 OPTICAL_FLOW(OPTICAL_FLOW_DATA),
36065 #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
36066 #[doc = ""]
36067 #[doc = "ID: 106"]
36068 OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
36069 #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
36070 #[doc = ""]
36071 #[doc = "ID: 360"]
36072 ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
36073 #[doc = "Parameter set/get error. Returned from a MAVLink node in response to an error in the parameter protocol, for example failing to set a parameter because it does not exist."]
36074 #[doc = ""]
36075 #[doc = "ID: 345"]
36076 PARAM_ERROR(PARAM_ERROR_DATA),
36077 #[doc = "Response from a PARAM_EXT_SET message."]
36078 #[doc = ""]
36079 #[doc = "ID: 324"]
36080 PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
36081 #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
36082 #[doc = ""]
36083 #[doc = "ID: 321"]
36084 PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
36085 #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
36086 #[doc = ""]
36087 #[doc = "ID: 320"]
36088 PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
36089 #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
36090 #[doc = ""]
36091 #[doc = "ID: 323"]
36092 PARAM_EXT_SET(PARAM_EXT_SET_DATA),
36093 #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
36094 #[doc = ""]
36095 #[doc = "ID: 322"]
36096 PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
36097 #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
36098 #[doc = ""]
36099 #[doc = "ID: 50"]
36100 PARAM_MAP_RC(PARAM_MAP_RC_DATA),
36101 #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
36102 #[doc = ""]
36103 #[doc = "ID: 21"]
36104 PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
36105 #[doc = "Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] ->value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
36106 #[doc = ""]
36107 #[doc = "ID: 20"]
36108 PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
36109 #[doc = "Set a parameter value (write new value to permanent storage). The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
36110 #[doc = ""]
36111 #[doc = "ID: 23"]
36112 PARAM_SET(PARAM_SET_DATA),
36113 #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
36114 #[doc = ""]
36115 #[doc = "ID: 22"]
36116 PARAM_VALUE(PARAM_VALUE_DATA),
36117 #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
36118 #[doc = ""]
36119 #[doc = "ID: 4"]
36120 #[deprecated = " See `TIMESYNC` (Superseded since 2011-08)"]
36121 PING(PING_DATA),
36122 #[doc = "Control vehicle tone generation (buzzer)."]
36123 #[doc = ""]
36124 #[doc = "ID: 258"]
36125 #[deprecated = " See `PLAY_TUNE_V2` (Superseded since 2019-10)"]
36126 PLAY_TUNE(PLAY_TUNE_DATA),
36127 #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
36128 #[doc = ""]
36129 #[doc = "ID: 400"]
36130 PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
36131 #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
36132 #[doc = ""]
36133 #[doc = "ID: 87"]
36134 POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
36135 #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
36136 #[doc = ""]
36137 #[doc = "ID: 85"]
36138 POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
36139 #[doc = "Power supply status."]
36140 #[doc = ""]
36141 #[doc = "ID: 125"]
36142 POWER_STATUS(POWER_STATUS_DATA),
36143 #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
36144 #[doc = ""]
36145 #[doc = "ID: 300"]
36146 #[deprecated = "No longer needed. Support is being removed from flight stacks. See `Nothing` (Deprecated since 2025-11)"]
36147 PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
36148 #[doc = "Status generated by radio and injected into MAVLink stream."]
36149 #[doc = ""]
36150 #[doc = "ID: 109"]
36151 RADIO_STATUS(RADIO_STATUS_DATA),
36152 #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
36153 #[doc = ""]
36154 #[doc = "ID: 27"]
36155 RAW_IMU(RAW_IMU_DATA),
36156 #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
36157 #[doc = ""]
36158 #[doc = "ID: 28"]
36159 RAW_PRESSURE(RAW_PRESSURE_DATA),
36160 #[doc = "RPM sensor data message."]
36161 #[doc = ""]
36162 #[doc = "ID: 339"]
36163 RAW_RPM(RAW_RPM_DATA),
36164 #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
36165 #[doc = ""]
36166 #[doc = "ID: 65"]
36167 RC_CHANNELS(RC_CHANNELS_DATA),
36168 #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
36169 #[doc = ""]
36170 #[doc = "ID: 70"]
36171 RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
36172 #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
36173 #[doc = ""]
36174 #[doc = "ID: 35"]
36175 RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
36176 #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
36177 #[doc = ""]
36178 #[doc = "ID: 34"]
36179 RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
36180 #[doc = "Request a data stream."]
36181 #[doc = ""]
36182 #[doc = "ID: 66"]
36183 #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Superseded since 2015-08)"]
36184 REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
36185 #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
36186 #[doc = ""]
36187 #[doc = "ID: 412"]
36188 REQUEST_EVENT(REQUEST_EVENT_DATA),
36189 #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
36190 #[doc = ""]
36191 #[doc = "ID: 142"]
36192 RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
36193 #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
36194 #[doc = ""]
36195 #[doc = "ID: 413"]
36196 RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
36197 #[doc = "Read out the safety zone the MAV currently assumes."]
36198 #[doc = ""]
36199 #[doc = "ID: 55"]
36200 SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
36201 #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
36202 #[doc = ""]
36203 #[doc = "ID: 54"]
36204 SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
36205 #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
36206 #[doc = ""]
36207 #[doc = "ID: 26"]
36208 SCALED_IMU(SCALED_IMU_DATA),
36209 #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
36210 #[doc = ""]
36211 #[doc = "ID: 116"]
36212 SCALED_IMU2(SCALED_IMU2_DATA),
36213 #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
36214 #[doc = ""]
36215 #[doc = "ID: 129"]
36216 SCALED_IMU3(SCALED_IMU3_DATA),
36217 #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
36218 #[doc = ""]
36219 #[doc = "ID: 29"]
36220 SCALED_PRESSURE(SCALED_PRESSURE_DATA),
36221 #[doc = "Barometer readings for 2nd barometer."]
36222 #[doc = ""]
36223 #[doc = "ID: 137"]
36224 SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
36225 #[doc = "Barometer readings for 3rd barometer."]
36226 #[doc = ""]
36227 #[doc = "ID: 143"]
36228 SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
36229 #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
36230 #[doc = ""]
36231 #[doc = "ID: 126"]
36232 SERIAL_CONTROL(SERIAL_CONTROL_DATA),
36233 #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
36234 #[doc = ""]
36235 #[doc = "ID: 36"]
36236 SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
36237 #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
36238 #[doc = ""]
36239 #[doc = "ID: 256"]
36240 SETUP_SIGNING(SETUP_SIGNING_DATA),
36241 #[doc = "Set the vehicle attitude and body angular rates."]
36242 #[doc = ""]
36243 #[doc = "ID: 139"]
36244 SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
36245 #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
36246 #[doc = ""]
36247 #[doc = "ID: 82"]
36248 SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
36249 #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
36250 #[doc = ""]
36251 #[doc = "ID: 48"]
36252 #[deprecated = " See `MAV_CMD_DO_SET_GLOBAL_ORIGIN` (Superseded since 2025-04)"]
36253 SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
36254 #[doc = "Sets the home position. The home position is the default position that the system will return to and land on. The position is set automatically by the system during the takeoff (and may also be set using this message). The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector. Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
36255 #[doc = ""]
36256 #[doc = "ID: 243"]
36257 #[deprecated = " See `MAV_CMD_DO_SET_HOME` (Superseded since 2022-02)"]
36258 SET_HOME_POSITION(SET_HOME_POSITION_DATA),
36259 #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
36260 #[doc = ""]
36261 #[doc = "ID: 11"]
36262 #[deprecated = " See `MAV_CMD_DO_SET_MODE` (Superseded since 2015-12)"]
36263 SET_MODE(SET_MODE_DATA),
36264 #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
36265 #[doc = ""]
36266 #[doc = "ID: 86"]
36267 SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
36268 #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
36269 #[doc = ""]
36270 #[doc = "ID: 84"]
36271 SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
36272 #[doc = "Status of simulation environment, if used."]
36273 #[doc = ""]
36274 #[doc = "ID: 108"]
36275 SIM_STATE(SIM_STATE_DATA),
36276 #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
36277 #[doc = ""]
36278 #[doc = "ID: 370"]
36279 #[deprecated = " See `BATTERY_INFO` (Superseded since 2024-02)"]
36280 SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
36281 #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
36282 #[doc = ""]
36283 #[doc = "ID: 253"]
36284 STATUSTEXT(STATUSTEXT_DATA),
36285 #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
36286 #[doc = ""]
36287 #[doc = "ID: 261"]
36288 STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
36289 #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
36290 #[doc = ""]
36291 #[doc = "ID: 401"]
36292 SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
36293 #[doc = "The system time is the time of the sender's master clock. This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network. Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a system that indicates a more recent time. This allows more broadly accurate date stamping of logs, and so on. If precise time synchronization is needed then use TIMESYNC instead."]
36294 #[doc = ""]
36295 #[doc = "ID: 2"]
36296 SYSTEM_TIME(SYSTEM_TIME_DATA),
36297 #[doc = "Sensor and subsystem status information. Provides a compact representation of sensor/subsystem status and a few other basic statistics."]
36298 #[doc = ""]
36299 #[doc = "ID: 1"]
36300 SYS_STATUS(SYS_STATUS_DATA),
36301 #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
36302 #[doc = ""]
36303 #[doc = "ID: 135"]
36304 TERRAIN_CHECK(TERRAIN_CHECK_DATA),
36305 #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
36306 #[doc = ""]
36307 #[doc = "ID: 134"]
36308 TERRAIN_DATA(TERRAIN_DATA_DATA),
36309 #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
36310 #[doc = ""]
36311 #[doc = "ID: 136"]
36312 TERRAIN_REPORT(TERRAIN_REPORT_DATA),
36313 #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
36314 #[doc = ""]
36315 #[doc = "ID: 133"]
36316 TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
36317 #[doc = "Time synchronization message. The message is used for both timesync requests and responses. The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component. The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request. Systems can determine if they are receiving a request or response based on the value of `tc`. If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requester may report an error. Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used). The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset. See also: <https://mavlink.io/en/services/timesync.html>."]
36318 #[doc = ""]
36319 #[doc = "ID: 111"]
36320 TIMESYNC(TIMESYNC_DATA),
36321 #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
36322 #[doc = ""]
36323 #[doc = "ID: 380"]
36324 TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
36325 #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
36326 #[doc = ""]
36327 #[doc = "ID: 333"]
36328 #[deprecated = "Implemented PX4 v1.11 to v1.14. Not used in current flight stacks. See `Nothing` (Deprecated since 2025-03)"]
36329 TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
36330 #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
36331 #[doc = ""]
36332 #[doc = "ID: 332"]
36333 #[deprecated = "Implemented PX4 v1.11 to v1.14. Not used in current flight stacks. See `Nothing` (Deprecated since 2025-03)"]
36334 TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
36335 #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
36336 #[doc = ""]
36337 #[doc = "ID: 385"]
36338 TUNNEL(TUNNEL_DATA),
36339 #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
36340 #[doc = ""]
36341 #[doc = "ID: 311"]
36342 UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
36343 #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
36344 #[doc = ""]
36345 #[doc = "ID: 310"]
36346 UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
36347 #[doc = "Request messages."]
36348 #[doc = ""]
36349 #[doc = "ID: 10006"]
36350 UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA),
36351 #[doc = "Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter)."]
36352 #[doc = ""]
36353 #[doc = "ID: 10001"]
36354 UAVIONIX_ADSB_OUT_CFG(UAVIONIX_ADSB_OUT_CFG_DATA),
36355 #[doc = "Flight Identification for ADSB-Out vehicles."]
36356 #[doc = ""]
36357 #[doc = "ID: 10005"]
36358 UAVIONIX_ADSB_OUT_CFG_FLIGHTID(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA),
36359 #[doc = "Aircraft Registration."]
36360 #[doc = ""]
36361 #[doc = "ID: 10004"]
36362 UAVIONIX_ADSB_OUT_CFG_REGISTRATION(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA),
36363 #[doc = "Control message with all data sent in UCP control message."]
36364 #[doc = ""]
36365 #[doc = "ID: 10007"]
36366 UAVIONIX_ADSB_OUT_CONTROL(UAVIONIX_ADSB_OUT_CONTROL_DATA),
36367 #[doc = "Dynamic data used to generate ADS-B out transponder data (send at 5Hz)."]
36368 #[doc = ""]
36369 #[doc = "ID: 10002"]
36370 UAVIONIX_ADSB_OUT_DYNAMIC(UAVIONIX_ADSB_OUT_DYNAMIC_DATA),
36371 #[doc = "Status message with information from UCP Heartbeat and Status messages."]
36372 #[doc = ""]
36373 #[doc = "ID: 10008"]
36374 UAVIONIX_ADSB_OUT_STATUS(UAVIONIX_ADSB_OUT_STATUS_DATA),
36375 #[doc = "Transceiver heartbeat with health report (updated every 10s)."]
36376 #[doc = ""]
36377 #[doc = "ID: 10003"]
36378 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA),
36379 #[doc = "The global position resulting from GPS and sensor fusion."]
36380 #[doc = ""]
36381 #[doc = "ID: 340"]
36382 UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
36383 #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
36384 #[doc = ""]
36385 #[doc = "ID: 248"]
36386 V2_EXTENSION(V2_EXTENSION_DATA),
36387 #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
36388 #[doc = ""]
36389 #[doc = "ID: 74"]
36390 VFR_HUD(VFR_HUD_DATA),
36391 #[doc = "Vibration levels and accelerometer clipping."]
36392 #[doc = ""]
36393 #[doc = "ID: 241"]
36394 VIBRATION(VIBRATION_DATA),
36395 #[doc = "Global position estimate from a Vicon motion system source."]
36396 #[doc = ""]
36397 #[doc = "ID: 104"]
36398 VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
36399 #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
36400 #[doc = ""]
36401 #[doc = "ID: 269"]
36402 VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
36403 #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
36404 #[doc = ""]
36405 #[doc = "ID: 270"]
36406 VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
36407 #[doc = "Local position/attitude estimate from a vision source."]
36408 #[doc = ""]
36409 #[doc = "ID: 102"]
36410 VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
36411 #[doc = "Speed estimate from a vision source."]
36412 #[doc = ""]
36413 #[doc = "ID: 103"]
36414 VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
36415 #[doc = "Cumulative distance traveled for each reported wheel."]
36416 #[doc = ""]
36417 #[doc = "ID: 9000"]
36418 WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
36419 #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
36420 #[doc = ""]
36421 #[doc = "ID: 299"]
36422 WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
36423 #[doc = "Winch status."]
36424 #[doc = ""]
36425 #[doc = "ID: 9005"]
36426 WINCH_STATUS(WINCH_STATUS_DATA),
36427 #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
36428 #[doc = ""]
36429 #[doc = "ID: 231"]
36430 WIND_COV(WIND_COV_DATA),
36431}
36432impl MavMessage {
36433 pub const fn all_ids() -> &'static [u32] {
36434 &[
36435 0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
36436 24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
36437 36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
36438 48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
36439 67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
36440 84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
36441 103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
36442 114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
36443 125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
36444 136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
36445 148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
36446 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
36447 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
36448 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
36449 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
36450 295u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32,
36451 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 345u32, 350u32,
36452 360u32, 361u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32,
36453 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32,
36454 435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 10001u32, 10002u32, 10003u32,
36455 10004u32, 10005u32, 10006u32, 10007u32, 10008u32, 12900u32, 12901u32, 12902u32,
36456 12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
36457 ]
36458 }
36459 pub const fn all_messages() -> &'static [(&'static str, u32)] {
36460 &[
36461 (HEARTBEAT_DATA::NAME, HEARTBEAT_DATA::ID),
36462 (SYS_STATUS_DATA::NAME, SYS_STATUS_DATA::ID),
36463 (SYSTEM_TIME_DATA::NAME, SYSTEM_TIME_DATA::ID),
36464 (PING_DATA::NAME, PING_DATA::ID),
36465 (
36466 CHANGE_OPERATOR_CONTROL_DATA::NAME,
36467 CHANGE_OPERATOR_CONTROL_DATA::ID,
36468 ),
36469 (
36470 CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
36471 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
36472 ),
36473 (AUTH_KEY_DATA::NAME, AUTH_KEY_DATA::ID),
36474 (LINK_NODE_STATUS_DATA::NAME, LINK_NODE_STATUS_DATA::ID),
36475 (SET_MODE_DATA::NAME, SET_MODE_DATA::ID),
36476 (PARAM_REQUEST_READ_DATA::NAME, PARAM_REQUEST_READ_DATA::ID),
36477 (PARAM_REQUEST_LIST_DATA::NAME, PARAM_REQUEST_LIST_DATA::ID),
36478 (PARAM_VALUE_DATA::NAME, PARAM_VALUE_DATA::ID),
36479 (PARAM_SET_DATA::NAME, PARAM_SET_DATA::ID),
36480 (GPS_RAW_INT_DATA::NAME, GPS_RAW_INT_DATA::ID),
36481 (GPS_STATUS_DATA::NAME, GPS_STATUS_DATA::ID),
36482 (SCALED_IMU_DATA::NAME, SCALED_IMU_DATA::ID),
36483 (RAW_IMU_DATA::NAME, RAW_IMU_DATA::ID),
36484 (RAW_PRESSURE_DATA::NAME, RAW_PRESSURE_DATA::ID),
36485 (SCALED_PRESSURE_DATA::NAME, SCALED_PRESSURE_DATA::ID),
36486 (ATTITUDE_DATA::NAME, ATTITUDE_DATA::ID),
36487 (ATTITUDE_QUATERNION_DATA::NAME, ATTITUDE_QUATERNION_DATA::ID),
36488 (LOCAL_POSITION_NED_DATA::NAME, LOCAL_POSITION_NED_DATA::ID),
36489 (GLOBAL_POSITION_INT_DATA::NAME, GLOBAL_POSITION_INT_DATA::ID),
36490 (RC_CHANNELS_SCALED_DATA::NAME, RC_CHANNELS_SCALED_DATA::ID),
36491 (RC_CHANNELS_RAW_DATA::NAME, RC_CHANNELS_RAW_DATA::ID),
36492 (SERVO_OUTPUT_RAW_DATA::NAME, SERVO_OUTPUT_RAW_DATA::ID),
36493 (
36494 MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
36495 MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
36496 ),
36497 (
36498 MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
36499 MISSION_WRITE_PARTIAL_LIST_DATA::ID,
36500 ),
36501 (MISSION_ITEM_DATA::NAME, MISSION_ITEM_DATA::ID),
36502 (MISSION_REQUEST_DATA::NAME, MISSION_REQUEST_DATA::ID),
36503 (MISSION_SET_CURRENT_DATA::NAME, MISSION_SET_CURRENT_DATA::ID),
36504 (MISSION_CURRENT_DATA::NAME, MISSION_CURRENT_DATA::ID),
36505 (
36506 MISSION_REQUEST_LIST_DATA::NAME,
36507 MISSION_REQUEST_LIST_DATA::ID,
36508 ),
36509 (MISSION_COUNT_DATA::NAME, MISSION_COUNT_DATA::ID),
36510 (MISSION_CLEAR_ALL_DATA::NAME, MISSION_CLEAR_ALL_DATA::ID),
36511 (
36512 MISSION_ITEM_REACHED_DATA::NAME,
36513 MISSION_ITEM_REACHED_DATA::ID,
36514 ),
36515 (MISSION_ACK_DATA::NAME, MISSION_ACK_DATA::ID),
36516 (
36517 SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
36518 SET_GPS_GLOBAL_ORIGIN_DATA::ID,
36519 ),
36520 (GPS_GLOBAL_ORIGIN_DATA::NAME, GPS_GLOBAL_ORIGIN_DATA::ID),
36521 (PARAM_MAP_RC_DATA::NAME, PARAM_MAP_RC_DATA::ID),
36522 (MISSION_REQUEST_INT_DATA::NAME, MISSION_REQUEST_INT_DATA::ID),
36523 (
36524 SAFETY_SET_ALLOWED_AREA_DATA::NAME,
36525 SAFETY_SET_ALLOWED_AREA_DATA::ID,
36526 ),
36527 (SAFETY_ALLOWED_AREA_DATA::NAME, SAFETY_ALLOWED_AREA_DATA::ID),
36528 (
36529 ATTITUDE_QUATERNION_COV_DATA::NAME,
36530 ATTITUDE_QUATERNION_COV_DATA::ID,
36531 ),
36532 (
36533 NAV_CONTROLLER_OUTPUT_DATA::NAME,
36534 NAV_CONTROLLER_OUTPUT_DATA::ID,
36535 ),
36536 (
36537 GLOBAL_POSITION_INT_COV_DATA::NAME,
36538 GLOBAL_POSITION_INT_COV_DATA::ID,
36539 ),
36540 (
36541 LOCAL_POSITION_NED_COV_DATA::NAME,
36542 LOCAL_POSITION_NED_COV_DATA::ID,
36543 ),
36544 (RC_CHANNELS_DATA::NAME, RC_CHANNELS_DATA::ID),
36545 (REQUEST_DATA_STREAM_DATA::NAME, REQUEST_DATA_STREAM_DATA::ID),
36546 (DATA_STREAM_DATA::NAME, DATA_STREAM_DATA::ID),
36547 (MANUAL_CONTROL_DATA::NAME, MANUAL_CONTROL_DATA::ID),
36548 (
36549 RC_CHANNELS_OVERRIDE_DATA::NAME,
36550 RC_CHANNELS_OVERRIDE_DATA::ID,
36551 ),
36552 (MISSION_ITEM_INT_DATA::NAME, MISSION_ITEM_INT_DATA::ID),
36553 (VFR_HUD_DATA::NAME, VFR_HUD_DATA::ID),
36554 (COMMAND_INT_DATA::NAME, COMMAND_INT_DATA::ID),
36555 (COMMAND_LONG_DATA::NAME, COMMAND_LONG_DATA::ID),
36556 (COMMAND_ACK_DATA::NAME, COMMAND_ACK_DATA::ID),
36557 (COMMAND_CANCEL_DATA::NAME, COMMAND_CANCEL_DATA::ID),
36558 (MANUAL_SETPOINT_DATA::NAME, MANUAL_SETPOINT_DATA::ID),
36559 (SET_ATTITUDE_TARGET_DATA::NAME, SET_ATTITUDE_TARGET_DATA::ID),
36560 (ATTITUDE_TARGET_DATA::NAME, ATTITUDE_TARGET_DATA::ID),
36561 (
36562 SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
36563 SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
36564 ),
36565 (
36566 POSITION_TARGET_LOCAL_NED_DATA::NAME,
36567 POSITION_TARGET_LOCAL_NED_DATA::ID,
36568 ),
36569 (
36570 SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36571 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
36572 ),
36573 (
36574 POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36575 POSITION_TARGET_GLOBAL_INT_DATA::ID,
36576 ),
36577 (
36578 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME,
36579 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID,
36580 ),
36581 (HIL_STATE_DATA::NAME, HIL_STATE_DATA::ID),
36582 (HIL_CONTROLS_DATA::NAME, HIL_CONTROLS_DATA::ID),
36583 (HIL_RC_INPUTS_RAW_DATA::NAME, HIL_RC_INPUTS_RAW_DATA::ID),
36584 (
36585 HIL_ACTUATOR_CONTROLS_DATA::NAME,
36586 HIL_ACTUATOR_CONTROLS_DATA::ID,
36587 ),
36588 (OPTICAL_FLOW_DATA::NAME, OPTICAL_FLOW_DATA::ID),
36589 (
36590 GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
36591 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
36592 ),
36593 (
36594 VISION_POSITION_ESTIMATE_DATA::NAME,
36595 VISION_POSITION_ESTIMATE_DATA::ID,
36596 ),
36597 (
36598 VISION_SPEED_ESTIMATE_DATA::NAME,
36599 VISION_SPEED_ESTIMATE_DATA::ID,
36600 ),
36601 (
36602 VICON_POSITION_ESTIMATE_DATA::NAME,
36603 VICON_POSITION_ESTIMATE_DATA::ID,
36604 ),
36605 (HIGHRES_IMU_DATA::NAME, HIGHRES_IMU_DATA::ID),
36606 (OPTICAL_FLOW_RAD_DATA::NAME, OPTICAL_FLOW_RAD_DATA::ID),
36607 (HIL_SENSOR_DATA::NAME, HIL_SENSOR_DATA::ID),
36608 (SIM_STATE_DATA::NAME, SIM_STATE_DATA::ID),
36609 (RADIO_STATUS_DATA::NAME, RADIO_STATUS_DATA::ID),
36610 (
36611 FILE_TRANSFER_PROTOCOL_DATA::NAME,
36612 FILE_TRANSFER_PROTOCOL_DATA::ID,
36613 ),
36614 (TIMESYNC_DATA::NAME, TIMESYNC_DATA::ID),
36615 (CAMERA_TRIGGER_DATA::NAME, CAMERA_TRIGGER_DATA::ID),
36616 (HIL_GPS_DATA::NAME, HIL_GPS_DATA::ID),
36617 (HIL_OPTICAL_FLOW_DATA::NAME, HIL_OPTICAL_FLOW_DATA::ID),
36618 (
36619 HIL_STATE_QUATERNION_DATA::NAME,
36620 HIL_STATE_QUATERNION_DATA::ID,
36621 ),
36622 (SCALED_IMU2_DATA::NAME, SCALED_IMU2_DATA::ID),
36623 (LOG_REQUEST_LIST_DATA::NAME, LOG_REQUEST_LIST_DATA::ID),
36624 (LOG_ENTRY_DATA::NAME, LOG_ENTRY_DATA::ID),
36625 (LOG_REQUEST_DATA_DATA::NAME, LOG_REQUEST_DATA_DATA::ID),
36626 (LOG_DATA_DATA::NAME, LOG_DATA_DATA::ID),
36627 (LOG_ERASE_DATA::NAME, LOG_ERASE_DATA::ID),
36628 (LOG_REQUEST_END_DATA::NAME, LOG_REQUEST_END_DATA::ID),
36629 (GPS_INJECT_DATA_DATA::NAME, GPS_INJECT_DATA_DATA::ID),
36630 (GPS2_RAW_DATA::NAME, GPS2_RAW_DATA::ID),
36631 (POWER_STATUS_DATA::NAME, POWER_STATUS_DATA::ID),
36632 (SERIAL_CONTROL_DATA::NAME, SERIAL_CONTROL_DATA::ID),
36633 (GPS_RTK_DATA::NAME, GPS_RTK_DATA::ID),
36634 (GPS2_RTK_DATA::NAME, GPS2_RTK_DATA::ID),
36635 (SCALED_IMU3_DATA::NAME, SCALED_IMU3_DATA::ID),
36636 (
36637 DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
36638 DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
36639 ),
36640 (ENCAPSULATED_DATA_DATA::NAME, ENCAPSULATED_DATA_DATA::ID),
36641 (DISTANCE_SENSOR_DATA::NAME, DISTANCE_SENSOR_DATA::ID),
36642 (TERRAIN_REQUEST_DATA::NAME, TERRAIN_REQUEST_DATA::ID),
36643 (TERRAIN_DATA_DATA::NAME, TERRAIN_DATA_DATA::ID),
36644 (TERRAIN_CHECK_DATA::NAME, TERRAIN_CHECK_DATA::ID),
36645 (TERRAIN_REPORT_DATA::NAME, TERRAIN_REPORT_DATA::ID),
36646 (SCALED_PRESSURE2_DATA::NAME, SCALED_PRESSURE2_DATA::ID),
36647 (ATT_POS_MOCAP_DATA::NAME, ATT_POS_MOCAP_DATA::ID),
36648 (
36649 SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
36650 SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
36651 ),
36652 (
36653 ACTUATOR_CONTROL_TARGET_DATA::NAME,
36654 ACTUATOR_CONTROL_TARGET_DATA::ID,
36655 ),
36656 (ALTITUDE_DATA::NAME, ALTITUDE_DATA::ID),
36657 (RESOURCE_REQUEST_DATA::NAME, RESOURCE_REQUEST_DATA::ID),
36658 (SCALED_PRESSURE3_DATA::NAME, SCALED_PRESSURE3_DATA::ID),
36659 (FOLLOW_TARGET_DATA::NAME, FOLLOW_TARGET_DATA::ID),
36660 (
36661 CONTROL_SYSTEM_STATE_DATA::NAME,
36662 CONTROL_SYSTEM_STATE_DATA::ID,
36663 ),
36664 (BATTERY_STATUS_DATA::NAME, BATTERY_STATUS_DATA::ID),
36665 (AUTOPILOT_VERSION_DATA::NAME, AUTOPILOT_VERSION_DATA::ID),
36666 (LANDING_TARGET_DATA::NAME, LANDING_TARGET_DATA::ID),
36667 (FENCE_STATUS_DATA::NAME, FENCE_STATUS_DATA::ID),
36668 (MAG_CAL_REPORT_DATA::NAME, MAG_CAL_REPORT_DATA::ID),
36669 (EFI_STATUS_DATA::NAME, EFI_STATUS_DATA::ID),
36670 (ESTIMATOR_STATUS_DATA::NAME, ESTIMATOR_STATUS_DATA::ID),
36671 (WIND_COV_DATA::NAME, WIND_COV_DATA::ID),
36672 (GPS_INPUT_DATA::NAME, GPS_INPUT_DATA::ID),
36673 (GPS_RTCM_DATA_DATA::NAME, GPS_RTCM_DATA_DATA::ID),
36674 (HIGH_LATENCY_DATA::NAME, HIGH_LATENCY_DATA::ID),
36675 (HIGH_LATENCY2_DATA::NAME, HIGH_LATENCY2_DATA::ID),
36676 (VIBRATION_DATA::NAME, VIBRATION_DATA::ID),
36677 (HOME_POSITION_DATA::NAME, HOME_POSITION_DATA::ID),
36678 (SET_HOME_POSITION_DATA::NAME, SET_HOME_POSITION_DATA::ID),
36679 (MESSAGE_INTERVAL_DATA::NAME, MESSAGE_INTERVAL_DATA::ID),
36680 (EXTENDED_SYS_STATE_DATA::NAME, EXTENDED_SYS_STATE_DATA::ID),
36681 (ADSB_VEHICLE_DATA::NAME, ADSB_VEHICLE_DATA::ID),
36682 (COLLISION_DATA::NAME, COLLISION_DATA::ID),
36683 (V2_EXTENSION_DATA::NAME, V2_EXTENSION_DATA::ID),
36684 (MEMORY_VECT_DATA::NAME, MEMORY_VECT_DATA::ID),
36685 (DEBUG_VECT_DATA::NAME, DEBUG_VECT_DATA::ID),
36686 (NAMED_VALUE_FLOAT_DATA::NAME, NAMED_VALUE_FLOAT_DATA::ID),
36687 (NAMED_VALUE_INT_DATA::NAME, NAMED_VALUE_INT_DATA::ID),
36688 (STATUSTEXT_DATA::NAME, STATUSTEXT_DATA::ID),
36689 (DEBUG_DATA::NAME, DEBUG_DATA::ID),
36690 (SETUP_SIGNING_DATA::NAME, SETUP_SIGNING_DATA::ID),
36691 (BUTTON_CHANGE_DATA::NAME, BUTTON_CHANGE_DATA::ID),
36692 (PLAY_TUNE_DATA::NAME, PLAY_TUNE_DATA::ID),
36693 (CAMERA_INFORMATION_DATA::NAME, CAMERA_INFORMATION_DATA::ID),
36694 (CAMERA_SETTINGS_DATA::NAME, CAMERA_SETTINGS_DATA::ID),
36695 (STORAGE_INFORMATION_DATA::NAME, STORAGE_INFORMATION_DATA::ID),
36696 (
36697 CAMERA_CAPTURE_STATUS_DATA::NAME,
36698 CAMERA_CAPTURE_STATUS_DATA::ID,
36699 ),
36700 (
36701 CAMERA_IMAGE_CAPTURED_DATA::NAME,
36702 CAMERA_IMAGE_CAPTURED_DATA::ID,
36703 ),
36704 (FLIGHT_INFORMATION_DATA::NAME, FLIGHT_INFORMATION_DATA::ID),
36705 (MOUNT_ORIENTATION_DATA::NAME, MOUNT_ORIENTATION_DATA::ID),
36706 (LOGGING_DATA_DATA::NAME, LOGGING_DATA_DATA::ID),
36707 (LOGGING_DATA_ACKED_DATA::NAME, LOGGING_DATA_ACKED_DATA::ID),
36708 (LOGGING_ACK_DATA::NAME, LOGGING_ACK_DATA::ID),
36709 (
36710 VIDEO_STREAM_INFORMATION_DATA::NAME,
36711 VIDEO_STREAM_INFORMATION_DATA::ID,
36712 ),
36713 (VIDEO_STREAM_STATUS_DATA::NAME, VIDEO_STREAM_STATUS_DATA::ID),
36714 (CAMERA_FOV_STATUS_DATA::NAME, CAMERA_FOV_STATUS_DATA::ID),
36715 (
36716 CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
36717 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
36718 ),
36719 (
36720 CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
36721 CAMERA_TRACKING_GEO_STATUS_DATA::ID,
36722 ),
36723 (
36724 CAMERA_THERMAL_RANGE_DATA::NAME,
36725 CAMERA_THERMAL_RANGE_DATA::ID,
36726 ),
36727 (
36728 GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36729 GIMBAL_MANAGER_INFORMATION_DATA::ID,
36730 ),
36731 (
36732 GIMBAL_MANAGER_STATUS_DATA::NAME,
36733 GIMBAL_MANAGER_STATUS_DATA::ID,
36734 ),
36735 (
36736 GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36737 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
36738 ),
36739 (
36740 GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36741 GIMBAL_DEVICE_INFORMATION_DATA::ID,
36742 ),
36743 (
36744 GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36745 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
36746 ),
36747 (
36748 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36749 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
36750 ),
36751 (
36752 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME,
36753 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID,
36754 ),
36755 (
36756 GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36757 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
36758 ),
36759 (
36760 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME,
36761 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID,
36762 ),
36763 (ESC_INFO_DATA::NAME, ESC_INFO_DATA::ID),
36764 (ESC_STATUS_DATA::NAME, ESC_STATUS_DATA::ID),
36765 (AIRSPEED_DATA::NAME, AIRSPEED_DATA::ID),
36766 (WIFI_CONFIG_AP_DATA::NAME, WIFI_CONFIG_AP_DATA::ID),
36767 (PROTOCOL_VERSION_DATA::NAME, PROTOCOL_VERSION_DATA::ID),
36768 (AIS_VESSEL_DATA::NAME, AIS_VESSEL_DATA::ID),
36769 (UAVCAN_NODE_STATUS_DATA::NAME, UAVCAN_NODE_STATUS_DATA::ID),
36770 (UAVCAN_NODE_INFO_DATA::NAME, UAVCAN_NODE_INFO_DATA::ID),
36771 (
36772 PARAM_EXT_REQUEST_READ_DATA::NAME,
36773 PARAM_EXT_REQUEST_READ_DATA::ID,
36774 ),
36775 (
36776 PARAM_EXT_REQUEST_LIST_DATA::NAME,
36777 PARAM_EXT_REQUEST_LIST_DATA::ID,
36778 ),
36779 (PARAM_EXT_VALUE_DATA::NAME, PARAM_EXT_VALUE_DATA::ID),
36780 (PARAM_EXT_SET_DATA::NAME, PARAM_EXT_SET_DATA::ID),
36781 (PARAM_EXT_ACK_DATA::NAME, PARAM_EXT_ACK_DATA::ID),
36782 (OBSTACLE_DISTANCE_DATA::NAME, OBSTACLE_DISTANCE_DATA::ID),
36783 (ODOMETRY_DATA::NAME, ODOMETRY_DATA::ID),
36784 (
36785 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME,
36786 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID,
36787 ),
36788 (
36789 TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME,
36790 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
36791 ),
36792 (CELLULAR_STATUS_DATA::NAME, CELLULAR_STATUS_DATA::ID),
36793 (ISBD_LINK_STATUS_DATA::NAME, ISBD_LINK_STATUS_DATA::ID),
36794 (CELLULAR_CONFIG_DATA::NAME, CELLULAR_CONFIG_DATA::ID),
36795 (RAW_RPM_DATA::NAME, RAW_RPM_DATA::ID),
36796 (UTM_GLOBAL_POSITION_DATA::NAME, UTM_GLOBAL_POSITION_DATA::ID),
36797 (PARAM_ERROR_DATA::NAME, PARAM_ERROR_DATA::ID),
36798 (DEBUG_FLOAT_ARRAY_DATA::NAME, DEBUG_FLOAT_ARRAY_DATA::ID),
36799 (
36800 ORBIT_EXECUTION_STATUS_DATA::NAME,
36801 ORBIT_EXECUTION_STATUS_DATA::ID,
36802 ),
36803 (
36804 FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME,
36805 FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID,
36806 ),
36807 (SMART_BATTERY_INFO_DATA::NAME, SMART_BATTERY_INFO_DATA::ID),
36808 (FUEL_STATUS_DATA::NAME, FUEL_STATUS_DATA::ID),
36809 (BATTERY_INFO_DATA::NAME, BATTERY_INFO_DATA::ID),
36810 (GENERATOR_STATUS_DATA::NAME, GENERATOR_STATUS_DATA::ID),
36811 (
36812 ACTUATOR_OUTPUT_STATUS_DATA::NAME,
36813 ACTUATOR_OUTPUT_STATUS_DATA::ID,
36814 ),
36815 (
36816 TIME_ESTIMATE_TO_TARGET_DATA::NAME,
36817 TIME_ESTIMATE_TO_TARGET_DATA::ID,
36818 ),
36819 (TUNNEL_DATA::NAME, TUNNEL_DATA::ID),
36820 (CAN_FRAME_DATA::NAME, CAN_FRAME_DATA::ID),
36821 (CANFD_FRAME_DATA::NAME, CANFD_FRAME_DATA::ID),
36822 (CAN_FILTER_MODIFY_DATA::NAME, CAN_FILTER_MODIFY_DATA::ID),
36823 (
36824 ONBOARD_COMPUTER_STATUS_DATA::NAME,
36825 ONBOARD_COMPUTER_STATUS_DATA::ID,
36826 ),
36827 (
36828 COMPONENT_INFORMATION_DATA::NAME,
36829 COMPONENT_INFORMATION_DATA::ID,
36830 ),
36831 (
36832 COMPONENT_INFORMATION_BASIC_DATA::NAME,
36833 COMPONENT_INFORMATION_BASIC_DATA::ID,
36834 ),
36835 (COMPONENT_METADATA_DATA::NAME, COMPONENT_METADATA_DATA::ID),
36836 (PLAY_TUNE_V2_DATA::NAME, PLAY_TUNE_V2_DATA::ID),
36837 (SUPPORTED_TUNES_DATA::NAME, SUPPORTED_TUNES_DATA::ID),
36838 (EVENT_DATA::NAME, EVENT_DATA::ID),
36839 (
36840 CURRENT_EVENT_SEQUENCE_DATA::NAME,
36841 CURRENT_EVENT_SEQUENCE_DATA::ID,
36842 ),
36843 (REQUEST_EVENT_DATA::NAME, REQUEST_EVENT_DATA::ID),
36844 (
36845 RESPONSE_EVENT_ERROR_DATA::NAME,
36846 RESPONSE_EVENT_ERROR_DATA::ID,
36847 ),
36848 (AVAILABLE_MODES_DATA::NAME, AVAILABLE_MODES_DATA::ID),
36849 (CURRENT_MODE_DATA::NAME, CURRENT_MODE_DATA::ID),
36850 (
36851 AVAILABLE_MODES_MONITOR_DATA::NAME,
36852 AVAILABLE_MODES_MONITOR_DATA::ID,
36853 ),
36854 (ILLUMINATOR_STATUS_DATA::NAME, ILLUMINATOR_STATUS_DATA::ID),
36855 (WHEEL_DISTANCE_DATA::NAME, WHEEL_DISTANCE_DATA::ID),
36856 (WINCH_STATUS_DATA::NAME, WINCH_STATUS_DATA::ID),
36857 (
36858 UAVIONIX_ADSB_OUT_CFG_DATA::NAME,
36859 UAVIONIX_ADSB_OUT_CFG_DATA::ID,
36860 ),
36861 (
36862 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME,
36863 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID,
36864 ),
36865 (
36866 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME,
36867 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID,
36868 ),
36869 (
36870 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME,
36871 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID,
36872 ),
36873 (
36874 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME,
36875 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID,
36876 ),
36877 (UAVIONIX_ADSB_GET_DATA::NAME, UAVIONIX_ADSB_GET_DATA::ID),
36878 (
36879 UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME,
36880 UAVIONIX_ADSB_OUT_CONTROL_DATA::ID,
36881 ),
36882 (
36883 UAVIONIX_ADSB_OUT_STATUS_DATA::NAME,
36884 UAVIONIX_ADSB_OUT_STATUS_DATA::ID,
36885 ),
36886 (
36887 OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
36888 OPEN_DRONE_ID_BASIC_ID_DATA::ID,
36889 ),
36890 (
36891 OPEN_DRONE_ID_LOCATION_DATA::NAME,
36892 OPEN_DRONE_ID_LOCATION_DATA::ID,
36893 ),
36894 (
36895 OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
36896 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
36897 ),
36898 (
36899 OPEN_DRONE_ID_SELF_ID_DATA::NAME,
36900 OPEN_DRONE_ID_SELF_ID_DATA::ID,
36901 ),
36902 (
36903 OPEN_DRONE_ID_SYSTEM_DATA::NAME,
36904 OPEN_DRONE_ID_SYSTEM_DATA::ID,
36905 ),
36906 (
36907 OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
36908 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
36909 ),
36910 (
36911 OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
36912 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
36913 ),
36914 (
36915 OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
36916 OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
36917 ),
36918 (
36919 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
36920 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
36921 ),
36922 (HYGROMETER_SENSOR_DATA::NAME, HYGROMETER_SENSOR_DATA::ID),
36923 ]
36924 }
36925}
36926impl Message for MavMessage {
36927 fn parse(
36928 version: MavlinkVersion,
36929 id: u32,
36930 payload: &[u8],
36931 ) -> Result<Self, ::mavlink_core::error::ParserError> {
36932 match id {
36933 ACTUATOR_CONTROL_TARGET_DATA::ID => {
36934 ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
36935 .map(Self::ACTUATOR_CONTROL_TARGET)
36936 }
36937 ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
36938 .map(Self::ACTUATOR_OUTPUT_STATUS),
36939 ADSB_VEHICLE_DATA::ID => {
36940 ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
36941 }
36942 AIRSPEED_DATA::ID => AIRSPEED_DATA::deser(version, payload).map(Self::AIRSPEED),
36943 AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
36944 ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
36945 ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
36946 ATTITUDE_QUATERNION_DATA::ID => {
36947 ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
36948 }
36949 ATTITUDE_QUATERNION_COV_DATA::ID => {
36950 ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
36951 .map(Self::ATTITUDE_QUATERNION_COV)
36952 }
36953 ATTITUDE_TARGET_DATA::ID => {
36954 ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
36955 }
36956 ATT_POS_MOCAP_DATA::ID => {
36957 ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
36958 }
36959 AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
36960 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36961 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
36962 .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
36963 }
36964 AUTOPILOT_VERSION_DATA::ID => {
36965 AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
36966 }
36967 AVAILABLE_MODES_DATA::ID => {
36968 AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
36969 }
36970 AVAILABLE_MODES_MONITOR_DATA::ID => {
36971 AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
36972 .map(Self::AVAILABLE_MODES_MONITOR)
36973 }
36974 BATTERY_INFO_DATA::ID => {
36975 BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
36976 }
36977 BATTERY_STATUS_DATA::ID => {
36978 BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
36979 }
36980 BUTTON_CHANGE_DATA::ID => {
36981 BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
36982 }
36983 CAMERA_CAPTURE_STATUS_DATA::ID => {
36984 CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
36985 }
36986 CAMERA_FOV_STATUS_DATA::ID => {
36987 CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
36988 }
36989 CAMERA_IMAGE_CAPTURED_DATA::ID => {
36990 CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
36991 }
36992 CAMERA_INFORMATION_DATA::ID => {
36993 CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
36994 }
36995 CAMERA_SETTINGS_DATA::ID => {
36996 CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
36997 }
36998 CAMERA_THERMAL_RANGE_DATA::ID => {
36999 CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
37000 }
37001 CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
37002 CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
37003 .map(Self::CAMERA_TRACKING_GEO_STATUS)
37004 }
37005 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
37006 CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
37007 .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
37008 }
37009 CAMERA_TRIGGER_DATA::ID => {
37010 CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
37011 }
37012 CANFD_FRAME_DATA::ID => {
37013 CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
37014 }
37015 CAN_FILTER_MODIFY_DATA::ID => {
37016 CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
37017 }
37018 CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
37019 CELLULAR_CONFIG_DATA::ID => {
37020 CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
37021 }
37022 CELLULAR_STATUS_DATA::ID => {
37023 CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
37024 }
37025 CHANGE_OPERATOR_CONTROL_DATA::ID => {
37026 CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
37027 .map(Self::CHANGE_OPERATOR_CONTROL)
37028 }
37029 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
37030 CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
37031 .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
37032 }
37033 COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
37034 COMMAND_ACK_DATA::ID => {
37035 COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
37036 }
37037 COMMAND_CANCEL_DATA::ID => {
37038 COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
37039 }
37040 COMMAND_INT_DATA::ID => {
37041 COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
37042 }
37043 COMMAND_LONG_DATA::ID => {
37044 COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
37045 }
37046 COMPONENT_INFORMATION_DATA::ID => {
37047 COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
37048 }
37049 COMPONENT_INFORMATION_BASIC_DATA::ID => {
37050 COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
37051 .map(Self::COMPONENT_INFORMATION_BASIC)
37052 }
37053 COMPONENT_METADATA_DATA::ID => {
37054 COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
37055 }
37056 CONTROL_SYSTEM_STATE_DATA::ID => {
37057 CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
37058 }
37059 CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
37060 .map(Self::CURRENT_EVENT_SEQUENCE),
37061 CURRENT_MODE_DATA::ID => {
37062 CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
37063 }
37064 DATA_STREAM_DATA::ID => {
37065 DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
37066 }
37067 DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
37068 DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
37069 .map(Self::DATA_TRANSMISSION_HANDSHAKE)
37070 }
37071 DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
37072 DEBUG_FLOAT_ARRAY_DATA::ID => {
37073 DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
37074 }
37075 DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
37076 DISTANCE_SENSOR_DATA::ID => {
37077 DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
37078 }
37079 EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
37080 ENCAPSULATED_DATA_DATA::ID => {
37081 ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
37082 }
37083 ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
37084 ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
37085 ESTIMATOR_STATUS_DATA::ID => {
37086 ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
37087 }
37088 EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
37089 EXTENDED_SYS_STATE_DATA::ID => {
37090 EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
37091 }
37092 FENCE_STATUS_DATA::ID => {
37093 FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
37094 }
37095 FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => {
37096 FIGURE_EIGHT_EXECUTION_STATUS_DATA::deser(version, payload)
37097 .map(Self::FIGURE_EIGHT_EXECUTION_STATUS)
37098 }
37099 FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
37100 .map(Self::FILE_TRANSFER_PROTOCOL),
37101 FLIGHT_INFORMATION_DATA::ID => {
37102 FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
37103 }
37104 FOLLOW_TARGET_DATA::ID => {
37105 FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
37106 }
37107 FUEL_STATUS_DATA::ID => {
37108 FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
37109 }
37110 GENERATOR_STATUS_DATA::ID => {
37111 GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
37112 }
37113 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
37114 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
37115 .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
37116 }
37117 GIMBAL_DEVICE_INFORMATION_DATA::ID => {
37118 GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
37119 .map(Self::GIMBAL_DEVICE_INFORMATION)
37120 }
37121 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
37122 GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
37123 .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
37124 }
37125 GIMBAL_MANAGER_INFORMATION_DATA::ID => {
37126 GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
37127 .map(Self::GIMBAL_MANAGER_INFORMATION)
37128 }
37129 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
37130 GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
37131 .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
37132 }
37133 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37134 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
37135 .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
37136 }
37137 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
37138 GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
37139 .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
37140 }
37141 GIMBAL_MANAGER_STATUS_DATA::ID => {
37142 GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
37143 }
37144 GLOBAL_POSITION_INT_DATA::ID => {
37145 GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
37146 }
37147 GLOBAL_POSITION_INT_COV_DATA::ID => {
37148 GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
37149 .map(Self::GLOBAL_POSITION_INT_COV)
37150 }
37151 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37152 GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
37153 .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
37154 }
37155 GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
37156 GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
37157 GPS_GLOBAL_ORIGIN_DATA::ID => {
37158 GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
37159 }
37160 GPS_INJECT_DATA_DATA::ID => {
37161 GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
37162 }
37163 GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
37164 GPS_RAW_INT_DATA::ID => {
37165 GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
37166 }
37167 GPS_RTCM_DATA_DATA::ID => {
37168 GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
37169 }
37170 GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
37171 GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
37172 HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
37173 HIGHRES_IMU_DATA::ID => {
37174 HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
37175 }
37176 HIGH_LATENCY_DATA::ID => {
37177 HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
37178 }
37179 HIGH_LATENCY2_DATA::ID => {
37180 HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
37181 }
37182 HIL_ACTUATOR_CONTROLS_DATA::ID => {
37183 HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
37184 }
37185 HIL_CONTROLS_DATA::ID => {
37186 HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
37187 }
37188 HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
37189 HIL_OPTICAL_FLOW_DATA::ID => {
37190 HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
37191 }
37192 HIL_RC_INPUTS_RAW_DATA::ID => {
37193 HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
37194 }
37195 HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
37196 HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
37197 HIL_STATE_QUATERNION_DATA::ID => {
37198 HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
37199 }
37200 HOME_POSITION_DATA::ID => {
37201 HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
37202 }
37203 HYGROMETER_SENSOR_DATA::ID => {
37204 HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
37205 }
37206 ILLUMINATOR_STATUS_DATA::ID => {
37207 ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
37208 }
37209 ISBD_LINK_STATUS_DATA::ID => {
37210 ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
37211 }
37212 LANDING_TARGET_DATA::ID => {
37213 LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
37214 }
37215 LINK_NODE_STATUS_DATA::ID => {
37216 LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
37217 }
37218 LOCAL_POSITION_NED_DATA::ID => {
37219 LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
37220 }
37221 LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
37222 .map(Self::LOCAL_POSITION_NED_COV),
37223 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37224 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
37225 .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
37226 }
37227 LOGGING_ACK_DATA::ID => {
37228 LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
37229 }
37230 LOGGING_DATA_DATA::ID => {
37231 LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
37232 }
37233 LOGGING_DATA_ACKED_DATA::ID => {
37234 LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
37235 }
37236 LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
37237 LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
37238 LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
37239 LOG_REQUEST_DATA_DATA::ID => {
37240 LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
37241 }
37242 LOG_REQUEST_END_DATA::ID => {
37243 LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
37244 }
37245 LOG_REQUEST_LIST_DATA::ID => {
37246 LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
37247 }
37248 MAG_CAL_REPORT_DATA::ID => {
37249 MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
37250 }
37251 MANUAL_CONTROL_DATA::ID => {
37252 MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
37253 }
37254 MANUAL_SETPOINT_DATA::ID => {
37255 MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
37256 }
37257 MEMORY_VECT_DATA::ID => {
37258 MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
37259 }
37260 MESSAGE_INTERVAL_DATA::ID => {
37261 MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
37262 }
37263 MISSION_ACK_DATA::ID => {
37264 MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
37265 }
37266 MISSION_CLEAR_ALL_DATA::ID => {
37267 MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
37268 }
37269 MISSION_COUNT_DATA::ID => {
37270 MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
37271 }
37272 MISSION_CURRENT_DATA::ID => {
37273 MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
37274 }
37275 MISSION_ITEM_DATA::ID => {
37276 MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
37277 }
37278 MISSION_ITEM_INT_DATA::ID => {
37279 MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
37280 }
37281 MISSION_ITEM_REACHED_DATA::ID => {
37282 MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
37283 }
37284 MISSION_REQUEST_DATA::ID => {
37285 MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
37286 }
37287 MISSION_REQUEST_INT_DATA::ID => {
37288 MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
37289 }
37290 MISSION_REQUEST_LIST_DATA::ID => {
37291 MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
37292 }
37293 MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
37294 MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
37295 .map(Self::MISSION_REQUEST_PARTIAL_LIST)
37296 }
37297 MISSION_SET_CURRENT_DATA::ID => {
37298 MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
37299 }
37300 MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
37301 MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
37302 .map(Self::MISSION_WRITE_PARTIAL_LIST)
37303 }
37304 MOUNT_ORIENTATION_DATA::ID => {
37305 MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
37306 }
37307 NAMED_VALUE_FLOAT_DATA::ID => {
37308 NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
37309 }
37310 NAMED_VALUE_INT_DATA::ID => {
37311 NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
37312 }
37313 NAV_CONTROLLER_OUTPUT_DATA::ID => {
37314 NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
37315 }
37316 OBSTACLE_DISTANCE_DATA::ID => {
37317 OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
37318 }
37319 ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
37320 ONBOARD_COMPUTER_STATUS_DATA::ID => {
37321 ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
37322 .map(Self::ONBOARD_COMPUTER_STATUS)
37323 }
37324 OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
37325 OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
37326 .map(Self::OPEN_DRONE_ID_ARM_STATUS)
37327 }
37328 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
37329 OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
37330 .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
37331 }
37332 OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
37333 .map(Self::OPEN_DRONE_ID_BASIC_ID),
37334 OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
37335 .map(Self::OPEN_DRONE_ID_LOCATION),
37336 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
37337 OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
37338 .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
37339 }
37340 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
37341 OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
37342 .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
37343 }
37344 OPEN_DRONE_ID_SELF_ID_DATA::ID => {
37345 OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
37346 }
37347 OPEN_DRONE_ID_SYSTEM_DATA::ID => {
37348 OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
37349 }
37350 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
37351 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
37352 .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
37353 }
37354 OPTICAL_FLOW_DATA::ID => {
37355 OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
37356 }
37357 OPTICAL_FLOW_RAD_DATA::ID => {
37358 OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
37359 }
37360 ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
37361 .map(Self::ORBIT_EXECUTION_STATUS),
37362 PARAM_ERROR_DATA::ID => {
37363 PARAM_ERROR_DATA::deser(version, payload).map(Self::PARAM_ERROR)
37364 }
37365 PARAM_EXT_ACK_DATA::ID => {
37366 PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
37367 }
37368 PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
37369 .map(Self::PARAM_EXT_REQUEST_LIST),
37370 PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
37371 .map(Self::PARAM_EXT_REQUEST_READ),
37372 PARAM_EXT_SET_DATA::ID => {
37373 PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
37374 }
37375 PARAM_EXT_VALUE_DATA::ID => {
37376 PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
37377 }
37378 PARAM_MAP_RC_DATA::ID => {
37379 PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
37380 }
37381 PARAM_REQUEST_LIST_DATA::ID => {
37382 PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
37383 }
37384 PARAM_REQUEST_READ_DATA::ID => {
37385 PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
37386 }
37387 PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
37388 PARAM_VALUE_DATA::ID => {
37389 PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
37390 }
37391 PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
37392 PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
37393 PLAY_TUNE_V2_DATA::ID => {
37394 PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
37395 }
37396 POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37397 POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
37398 .map(Self::POSITION_TARGET_GLOBAL_INT)
37399 }
37400 POSITION_TARGET_LOCAL_NED_DATA::ID => {
37401 POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
37402 .map(Self::POSITION_TARGET_LOCAL_NED)
37403 }
37404 POWER_STATUS_DATA::ID => {
37405 POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
37406 }
37407 PROTOCOL_VERSION_DATA::ID => {
37408 PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
37409 }
37410 RADIO_STATUS_DATA::ID => {
37411 RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
37412 }
37413 RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
37414 RAW_PRESSURE_DATA::ID => {
37415 RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
37416 }
37417 RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
37418 RC_CHANNELS_DATA::ID => {
37419 RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
37420 }
37421 RC_CHANNELS_OVERRIDE_DATA::ID => {
37422 RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
37423 }
37424 RC_CHANNELS_RAW_DATA::ID => {
37425 RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
37426 }
37427 RC_CHANNELS_SCALED_DATA::ID => {
37428 RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
37429 }
37430 REQUEST_DATA_STREAM_DATA::ID => {
37431 REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
37432 }
37433 REQUEST_EVENT_DATA::ID => {
37434 REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
37435 }
37436 RESOURCE_REQUEST_DATA::ID => {
37437 RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
37438 }
37439 RESPONSE_EVENT_ERROR_DATA::ID => {
37440 RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
37441 }
37442 SAFETY_ALLOWED_AREA_DATA::ID => {
37443 SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
37444 }
37445 SAFETY_SET_ALLOWED_AREA_DATA::ID => {
37446 SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
37447 .map(Self::SAFETY_SET_ALLOWED_AREA)
37448 }
37449 SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
37450 SCALED_IMU2_DATA::ID => {
37451 SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
37452 }
37453 SCALED_IMU3_DATA::ID => {
37454 SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
37455 }
37456 SCALED_PRESSURE_DATA::ID => {
37457 SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
37458 }
37459 SCALED_PRESSURE2_DATA::ID => {
37460 SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
37461 }
37462 SCALED_PRESSURE3_DATA::ID => {
37463 SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
37464 }
37465 SERIAL_CONTROL_DATA::ID => {
37466 SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
37467 }
37468 SERVO_OUTPUT_RAW_DATA::ID => {
37469 SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
37470 }
37471 SETUP_SIGNING_DATA::ID => {
37472 SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
37473 }
37474 SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
37475 SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
37476 .map(Self::SET_ACTUATOR_CONTROL_TARGET)
37477 }
37478 SET_ATTITUDE_TARGET_DATA::ID => {
37479 SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
37480 }
37481 SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
37482 SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
37483 }
37484 SET_HOME_POSITION_DATA::ID => {
37485 SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
37486 }
37487 SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
37488 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37489 SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
37490 .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
37491 }
37492 SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
37493 SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
37494 .map(Self::SET_POSITION_TARGET_LOCAL_NED)
37495 }
37496 SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
37497 SMART_BATTERY_INFO_DATA::ID => {
37498 SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
37499 }
37500 STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
37501 STORAGE_INFORMATION_DATA::ID => {
37502 STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
37503 }
37504 SUPPORTED_TUNES_DATA::ID => {
37505 SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
37506 }
37507 SYSTEM_TIME_DATA::ID => {
37508 SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
37509 }
37510 SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
37511 TERRAIN_CHECK_DATA::ID => {
37512 TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
37513 }
37514 TERRAIN_DATA_DATA::ID => {
37515 TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
37516 }
37517 TERRAIN_REPORT_DATA::ID => {
37518 TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
37519 }
37520 TERRAIN_REQUEST_DATA::ID => {
37521 TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
37522 }
37523 TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
37524 TIME_ESTIMATE_TO_TARGET_DATA::ID => {
37525 TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
37526 .map(Self::TIME_ESTIMATE_TO_TARGET)
37527 }
37528 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37529 TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
37530 .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
37531 }
37532 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37533 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
37534 .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
37535 }
37536 TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
37537 UAVCAN_NODE_INFO_DATA::ID => {
37538 UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
37539 }
37540 UAVCAN_NODE_STATUS_DATA::ID => {
37541 UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
37542 }
37543 UAVIONIX_ADSB_GET_DATA::ID => {
37544 UAVIONIX_ADSB_GET_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_GET)
37545 }
37546 UAVIONIX_ADSB_OUT_CFG_DATA::ID => {
37547 UAVIONIX_ADSB_OUT_CFG_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_OUT_CFG)
37548 }
37549 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
37550 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::deser(version, payload)
37551 .map(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID)
37552 }
37553 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
37554 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::deser(version, payload)
37555 .map(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION)
37556 }
37557 UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => {
37558 UAVIONIX_ADSB_OUT_CONTROL_DATA::deser(version, payload)
37559 .map(Self::UAVIONIX_ADSB_OUT_CONTROL)
37560 }
37561 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => {
37562 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::deser(version, payload)
37563 .map(Self::UAVIONIX_ADSB_OUT_DYNAMIC)
37564 }
37565 UAVIONIX_ADSB_OUT_STATUS_DATA::ID => {
37566 UAVIONIX_ADSB_OUT_STATUS_DATA::deser(version, payload)
37567 .map(Self::UAVIONIX_ADSB_OUT_STATUS)
37568 }
37569 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
37570 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::deser(version, payload)
37571 .map(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT)
37572 }
37573 UTM_GLOBAL_POSITION_DATA::ID => {
37574 UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
37575 }
37576 V2_EXTENSION_DATA::ID => {
37577 V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
37578 }
37579 VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
37580 VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
37581 VICON_POSITION_ESTIMATE_DATA::ID => {
37582 VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
37583 .map(Self::VICON_POSITION_ESTIMATE)
37584 }
37585 VIDEO_STREAM_INFORMATION_DATA::ID => {
37586 VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
37587 .map(Self::VIDEO_STREAM_INFORMATION)
37588 }
37589 VIDEO_STREAM_STATUS_DATA::ID => {
37590 VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
37591 }
37592 VISION_POSITION_ESTIMATE_DATA::ID => {
37593 VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
37594 .map(Self::VISION_POSITION_ESTIMATE)
37595 }
37596 VISION_SPEED_ESTIMATE_DATA::ID => {
37597 VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
37598 }
37599 WHEEL_DISTANCE_DATA::ID => {
37600 WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
37601 }
37602 WIFI_CONFIG_AP_DATA::ID => {
37603 WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
37604 }
37605 WINCH_STATUS_DATA::ID => {
37606 WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
37607 }
37608 WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
37609 _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
37610 }
37611 }
37612 fn message_name(&self) -> &'static str {
37613 match self {
37614 Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
37615 Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
37616 Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
37617 Self::AIRSPEED(..) => AIRSPEED_DATA::NAME,
37618 Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
37619 Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
37620 Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
37621 Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
37622 Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
37623 Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
37624 Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
37625 Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
37626 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
37627 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
37628 }
37629 Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
37630 Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
37631 Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
37632 Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
37633 Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
37634 Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
37635 Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
37636 Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
37637 Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
37638 Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
37639 Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
37640 Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
37641 Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
37642 Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
37643 Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
37644 Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
37645 Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
37646 Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
37647 Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
37648 Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
37649 Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
37650 Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
37651 Self::COLLISION(..) => COLLISION_DATA::NAME,
37652 Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
37653 Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
37654 Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
37655 Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
37656 Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
37657 Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
37658 Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
37659 Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
37660 Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
37661 Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
37662 Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
37663 Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
37664 Self::DEBUG(..) => DEBUG_DATA::NAME,
37665 Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
37666 Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
37667 Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
37668 Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
37669 Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
37670 Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
37671 Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
37672 Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
37673 Self::EVENT(..) => EVENT_DATA::NAME,
37674 Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
37675 Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
37676 Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME,
37677 Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
37678 Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
37679 Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
37680 Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
37681 Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
37682 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
37683 Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
37684 Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
37685 Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
37686 Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
37687 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
37688 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
37689 }
37690 Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
37691 Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
37692 Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
37693 Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
37694 Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
37695 Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
37696 Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
37697 Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
37698 Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
37699 Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
37700 Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
37701 Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
37702 Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
37703 Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
37704 Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
37705 Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
37706 Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
37707 Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
37708 Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
37709 Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
37710 Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
37711 Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
37712 Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
37713 Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
37714 Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
37715 Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
37716 Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
37717 Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
37718 Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
37719 Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
37720 Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
37721 Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
37722 Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
37723 Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
37724 Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
37725 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
37726 }
37727 Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
37728 Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
37729 Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
37730 Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
37731 Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
37732 Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
37733 Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
37734 Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
37735 Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
37736 Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
37737 Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
37738 Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
37739 Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
37740 Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
37741 Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
37742 Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
37743 Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
37744 Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
37745 Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
37746 Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
37747 Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
37748 Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
37749 Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
37750 Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
37751 Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
37752 Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
37753 Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
37754 Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
37755 Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
37756 Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
37757 Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
37758 Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
37759 Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
37760 Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
37761 Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
37762 Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
37763 Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
37764 Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
37765 Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
37766 Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
37767 Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
37768 Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
37769 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
37770 Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
37771 Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
37772 Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
37773 Self::PARAM_ERROR(..) => PARAM_ERROR_DATA::NAME,
37774 Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
37775 Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
37776 Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
37777 Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
37778 Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
37779 Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
37780 Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
37781 Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
37782 Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
37783 Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
37784 Self::PING(..) => PING_DATA::NAME,
37785 Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
37786 Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
37787 Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
37788 Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
37789 Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
37790 Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
37791 Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
37792 Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
37793 Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
37794 Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
37795 Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
37796 Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
37797 Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
37798 Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
37799 Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
37800 Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
37801 Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
37802 Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
37803 Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
37804 Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
37805 Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
37806 Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
37807 Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
37808 Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
37809 Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
37810 Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
37811 Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
37812 Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
37813 Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
37814 Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
37815 Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
37816 Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
37817 Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
37818 Self::SET_MODE(..) => SET_MODE_DATA::NAME,
37819 Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
37820 Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
37821 Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
37822 Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
37823 Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
37824 Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
37825 Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
37826 Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
37827 Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
37828 Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
37829 Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
37830 Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
37831 Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
37832 Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
37833 Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
37834 Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
37835 TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
37836 }
37837 Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
37838 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
37839 }
37840 Self::TUNNEL(..) => TUNNEL_DATA::NAME,
37841 Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
37842 Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
37843 Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::NAME,
37844 Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::NAME,
37845 Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME,
37846 Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
37847 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME
37848 }
37849 Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME,
37850 Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME,
37851 Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::NAME,
37852 Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
37853 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME
37854 }
37855 Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
37856 Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
37857 Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
37858 Self::VIBRATION(..) => VIBRATION_DATA::NAME,
37859 Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
37860 Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
37861 Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
37862 Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
37863 Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
37864 Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
37865 Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
37866 Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
37867 Self::WIND_COV(..) => WIND_COV_DATA::NAME,
37868 }
37869 }
37870 fn message_id(&self) -> u32 {
37871 match self {
37872 Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
37873 Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
37874 Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
37875 Self::AIRSPEED(..) => AIRSPEED_DATA::ID,
37876 Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
37877 Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
37878 Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
37879 Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
37880 Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
37881 Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
37882 Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
37883 Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
37884 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
37885 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
37886 }
37887 Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
37888 Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
37889 Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
37890 Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
37891 Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
37892 Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
37893 Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
37894 Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
37895 Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
37896 Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
37897 Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
37898 Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
37899 Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
37900 Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
37901 Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
37902 Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
37903 Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
37904 Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
37905 Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
37906 Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
37907 Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
37908 Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
37909 Self::COLLISION(..) => COLLISION_DATA::ID,
37910 Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
37911 Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
37912 Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
37913 Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
37914 Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
37915 Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
37916 Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
37917 Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
37918 Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
37919 Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
37920 Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
37921 Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
37922 Self::DEBUG(..) => DEBUG_DATA::ID,
37923 Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
37924 Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
37925 Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
37926 Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
37927 Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
37928 Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
37929 Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
37930 Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
37931 Self::EVENT(..) => EVENT_DATA::ID,
37932 Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
37933 Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
37934 Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID,
37935 Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
37936 Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
37937 Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
37938 Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
37939 Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
37940 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
37941 Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
37942 Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
37943 Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
37944 Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
37945 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
37946 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
37947 }
37948 Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
37949 Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
37950 Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
37951 Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
37952 Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
37953 Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
37954 Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
37955 Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
37956 Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
37957 Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
37958 Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
37959 Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
37960 Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
37961 Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
37962 Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
37963 Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
37964 Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
37965 Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
37966 Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
37967 Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
37968 Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
37969 Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
37970 Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
37971 Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
37972 Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
37973 Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
37974 Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
37975 Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
37976 Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
37977 Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
37978 Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
37979 Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
37980 Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
37981 Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
37982 Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
37983 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
37984 }
37985 Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
37986 Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
37987 Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
37988 Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
37989 Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
37990 Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
37991 Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
37992 Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
37993 Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
37994 Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
37995 Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
37996 Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
37997 Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
37998 Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
37999 Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
38000 Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
38001 Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
38002 Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
38003 Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
38004 Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
38005 Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
38006 Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
38007 Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
38008 Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
38009 Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
38010 Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
38011 Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
38012 Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
38013 Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
38014 Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
38015 Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
38016 Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
38017 Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
38018 Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
38019 Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
38020 Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
38021 Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
38022 Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
38023 Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
38024 Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
38025 Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
38026 Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
38027 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
38028 Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
38029 Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
38030 Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
38031 Self::PARAM_ERROR(..) => PARAM_ERROR_DATA::ID,
38032 Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
38033 Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
38034 Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
38035 Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
38036 Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
38037 Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
38038 Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
38039 Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
38040 Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
38041 Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
38042 Self::PING(..) => PING_DATA::ID,
38043 Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
38044 Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
38045 Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
38046 Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
38047 Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
38048 Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
38049 Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
38050 Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
38051 Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
38052 Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
38053 Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
38054 Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
38055 Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
38056 Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
38057 Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
38058 Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
38059 Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
38060 Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
38061 Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
38062 Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
38063 Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
38064 Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
38065 Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
38066 Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
38067 Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
38068 Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
38069 Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
38070 Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
38071 Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
38072 Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
38073 Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
38074 Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
38075 Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
38076 Self::SET_MODE(..) => SET_MODE_DATA::ID,
38077 Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
38078 Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
38079 Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
38080 Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
38081 Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
38082 Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
38083 Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
38084 Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
38085 Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
38086 Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
38087 Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
38088 Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
38089 Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
38090 Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
38091 Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
38092 Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
38093 Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
38094 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
38095 }
38096 Self::TUNNEL(..) => TUNNEL_DATA::ID,
38097 Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
38098 Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
38099 Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::ID,
38100 Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::ID,
38101 Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID,
38102 Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
38103 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID
38104 }
38105 Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::ID,
38106 Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID,
38107 Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::ID,
38108 Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
38109 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID
38110 }
38111 Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
38112 Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
38113 Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
38114 Self::VIBRATION(..) => VIBRATION_DATA::ID,
38115 Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
38116 Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
38117 Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
38118 Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
38119 Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
38120 Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
38121 Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
38122 Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
38123 Self::WIND_COV(..) => WIND_COV_DATA::ID,
38124 }
38125 }
38126 fn message_id_from_name(name: &str) -> Option<u32> {
38127 match name {
38128 ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
38129 ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
38130 ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
38131 AIRSPEED_DATA::NAME => Some(AIRSPEED_DATA::ID),
38132 AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
38133 ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
38134 ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
38135 ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
38136 ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
38137 ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
38138 ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
38139 AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
38140 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
38141 Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
38142 }
38143 AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
38144 AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
38145 AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
38146 BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
38147 BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
38148 BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
38149 CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
38150 CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
38151 CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
38152 CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
38153 CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
38154 CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
38155 CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
38156 CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
38157 CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
38158 CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
38159 CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
38160 CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
38161 CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
38162 CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
38163 CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
38164 CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
38165 COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
38166 COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
38167 COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
38168 COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
38169 COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
38170 COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
38171 COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
38172 COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
38173 CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
38174 CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
38175 CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
38176 DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
38177 DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
38178 DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
38179 DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
38180 DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
38181 DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
38182 EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
38183 ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
38184 ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
38185 ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
38186 ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
38187 EVENT_DATA::NAME => Some(EVENT_DATA::ID),
38188 EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
38189 FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
38190 FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME => {
38191 Some(FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID)
38192 }
38193 FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
38194 FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
38195 FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
38196 FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
38197 GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
38198 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
38199 Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
38200 }
38201 GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
38202 GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
38203 GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
38204 GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
38205 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
38206 Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
38207 }
38208 GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
38209 GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
38210 GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
38211 GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
38212 GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
38213 Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
38214 }
38215 GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
38216 GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
38217 GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
38218 GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
38219 GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
38220 GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
38221 GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
38222 GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
38223 GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
38224 HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
38225 HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
38226 HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
38227 HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
38228 HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
38229 HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
38230 HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
38231 HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
38232 HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
38233 HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
38234 HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
38235 HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
38236 HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
38237 HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
38238 ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
38239 ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
38240 LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
38241 LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
38242 LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
38243 LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
38244 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
38245 Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
38246 }
38247 LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
38248 LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
38249 LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
38250 LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
38251 LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
38252 LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
38253 LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
38254 LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
38255 LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
38256 MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
38257 MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
38258 MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
38259 MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
38260 MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
38261 MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
38262 MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
38263 MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
38264 MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
38265 MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
38266 MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
38267 MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
38268 MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
38269 MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
38270 MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
38271 MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
38272 MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
38273 MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
38274 MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
38275 NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
38276 NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
38277 NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
38278 OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
38279 ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
38280 ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
38281 OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
38282 OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
38283 OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
38284 OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
38285 OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
38286 OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
38287 OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
38288 OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
38289 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
38290 OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
38291 OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
38292 ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
38293 PARAM_ERROR_DATA::NAME => Some(PARAM_ERROR_DATA::ID),
38294 PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
38295 PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
38296 PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
38297 PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
38298 PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
38299 PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
38300 PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
38301 PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
38302 PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
38303 PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
38304 PING_DATA::NAME => Some(PING_DATA::ID),
38305 PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
38306 PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
38307 POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
38308 POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
38309 POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
38310 PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
38311 RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
38312 RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
38313 RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
38314 RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
38315 RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
38316 RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
38317 RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
38318 RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
38319 REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
38320 REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
38321 RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
38322 RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
38323 SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
38324 SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
38325 SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
38326 SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
38327 SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
38328 SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
38329 SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
38330 SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
38331 SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
38332 SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
38333 SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
38334 SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
38335 SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
38336 SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
38337 SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
38338 SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
38339 SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
38340 Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
38341 }
38342 SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
38343 Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
38344 }
38345 SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
38346 SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
38347 STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
38348 STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
38349 SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
38350 SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
38351 SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
38352 TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
38353 TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
38354 TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
38355 TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
38356 TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
38357 TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
38358 TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
38359 Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
38360 }
38361 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
38362 Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
38363 }
38364 TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
38365 UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
38366 UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
38367 UAVIONIX_ADSB_GET_DATA::NAME => Some(UAVIONIX_ADSB_GET_DATA::ID),
38368 UAVIONIX_ADSB_OUT_CFG_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CFG_DATA::ID),
38369 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME => {
38370 Some(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID)
38371 }
38372 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME => {
38373 Some(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID)
38374 }
38375 UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CONTROL_DATA::ID),
38376 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME => Some(UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID),
38377 UAVIONIX_ADSB_OUT_STATUS_DATA::NAME => Some(UAVIONIX_ADSB_OUT_STATUS_DATA::ID),
38378 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME => {
38379 Some(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID)
38380 }
38381 UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
38382 V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
38383 VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
38384 VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
38385 VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
38386 VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
38387 VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
38388 VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
38389 VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
38390 WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
38391 WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
38392 WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
38393 WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
38394 _ => None,
38395 }
38396 }
38397 fn default_message_from_id(id: u32) -> Option<Self> {
38398 match id {
38399 ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
38400 ACTUATOR_CONTROL_TARGET_DATA::default(),
38401 )),
38402 ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
38403 ACTUATOR_OUTPUT_STATUS_DATA::default(),
38404 )),
38405 ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
38406 AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::default())),
38407 AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
38408 ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
38409 ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
38410 ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
38411 ATTITUDE_QUATERNION_DATA::default(),
38412 )),
38413 ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
38414 ATTITUDE_QUATERNION_COV_DATA::default(),
38415 )),
38416 ATTITUDE_TARGET_DATA::ID => {
38417 Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
38418 }
38419 ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
38420 AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
38421 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38422 Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
38423 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
38424 ))
38425 }
38426 AUTOPILOT_VERSION_DATA::ID => {
38427 Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
38428 }
38429 AVAILABLE_MODES_DATA::ID => {
38430 Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
38431 }
38432 AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
38433 AVAILABLE_MODES_MONITOR_DATA::default(),
38434 )),
38435 BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
38436 BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
38437 BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
38438 CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
38439 CAMERA_CAPTURE_STATUS_DATA::default(),
38440 )),
38441 CAMERA_FOV_STATUS_DATA::ID => {
38442 Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
38443 }
38444 CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
38445 CAMERA_IMAGE_CAPTURED_DATA::default(),
38446 )),
38447 CAMERA_INFORMATION_DATA::ID => {
38448 Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
38449 }
38450 CAMERA_SETTINGS_DATA::ID => {
38451 Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
38452 }
38453 CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
38454 CAMERA_THERMAL_RANGE_DATA::default(),
38455 )),
38456 CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
38457 CAMERA_TRACKING_GEO_STATUS_DATA::default(),
38458 )),
38459 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
38460 CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
38461 )),
38462 CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
38463 CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
38464 CAN_FILTER_MODIFY_DATA::ID => {
38465 Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
38466 }
38467 CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
38468 CELLULAR_CONFIG_DATA::ID => {
38469 Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
38470 }
38471 CELLULAR_STATUS_DATA::ID => {
38472 Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
38473 }
38474 CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
38475 CHANGE_OPERATOR_CONTROL_DATA::default(),
38476 )),
38477 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
38478 CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
38479 )),
38480 COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
38481 COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
38482 COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
38483 COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
38484 COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
38485 COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
38486 COMPONENT_INFORMATION_DATA::default(),
38487 )),
38488 COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
38489 COMPONENT_INFORMATION_BASIC_DATA::default(),
38490 )),
38491 COMPONENT_METADATA_DATA::ID => {
38492 Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
38493 }
38494 CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
38495 CONTROL_SYSTEM_STATE_DATA::default(),
38496 )),
38497 CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
38498 CURRENT_EVENT_SEQUENCE_DATA::default(),
38499 )),
38500 CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
38501 DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
38502 DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
38503 DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
38504 )),
38505 DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
38506 DEBUG_FLOAT_ARRAY_DATA::ID => {
38507 Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
38508 }
38509 DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
38510 DISTANCE_SENSOR_DATA::ID => {
38511 Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
38512 }
38513 EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
38514 ENCAPSULATED_DATA_DATA::ID => {
38515 Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
38516 }
38517 ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
38518 ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
38519 ESTIMATOR_STATUS_DATA::ID => {
38520 Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
38521 }
38522 EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
38523 EXTENDED_SYS_STATE_DATA::ID => {
38524 Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
38525 }
38526 FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
38527 FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
38528 FIGURE_EIGHT_EXECUTION_STATUS_DATA::default(),
38529 )),
38530 FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
38531 FILE_TRANSFER_PROTOCOL_DATA::default(),
38532 )),
38533 FLIGHT_INFORMATION_DATA::ID => {
38534 Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
38535 }
38536 FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
38537 FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
38538 GENERATOR_STATUS_DATA::ID => {
38539 Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
38540 }
38541 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
38542 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
38543 )),
38544 GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
38545 GIMBAL_DEVICE_INFORMATION_DATA::default(),
38546 )),
38547 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
38548 GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
38549 )),
38550 GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
38551 GIMBAL_MANAGER_INFORMATION_DATA::default(),
38552 )),
38553 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
38554 GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
38555 )),
38556 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
38557 Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
38558 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
38559 ))
38560 }
38561 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
38562 GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
38563 )),
38564 GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
38565 GIMBAL_MANAGER_STATUS_DATA::default(),
38566 )),
38567 GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
38568 GLOBAL_POSITION_INT_DATA::default(),
38569 )),
38570 GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
38571 GLOBAL_POSITION_INT_COV_DATA::default(),
38572 )),
38573 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
38574 Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
38575 GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
38576 ))
38577 }
38578 GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
38579 GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
38580 GPS_GLOBAL_ORIGIN_DATA::ID => {
38581 Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
38582 }
38583 GPS_INJECT_DATA_DATA::ID => {
38584 Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
38585 }
38586 GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
38587 GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
38588 GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
38589 GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
38590 GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
38591 HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
38592 HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
38593 HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
38594 HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
38595 HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
38596 HIL_ACTUATOR_CONTROLS_DATA::default(),
38597 )),
38598 HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
38599 HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
38600 HIL_OPTICAL_FLOW_DATA::ID => {
38601 Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
38602 }
38603 HIL_RC_INPUTS_RAW_DATA::ID => {
38604 Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
38605 }
38606 HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
38607 HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
38608 HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
38609 HIL_STATE_QUATERNION_DATA::default(),
38610 )),
38611 HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
38612 HYGROMETER_SENSOR_DATA::ID => {
38613 Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
38614 }
38615 ILLUMINATOR_STATUS_DATA::ID => {
38616 Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
38617 }
38618 ISBD_LINK_STATUS_DATA::ID => {
38619 Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
38620 }
38621 LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
38622 LINK_NODE_STATUS_DATA::ID => {
38623 Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
38624 }
38625 LOCAL_POSITION_NED_DATA::ID => {
38626 Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
38627 }
38628 LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
38629 LOCAL_POSITION_NED_COV_DATA::default(),
38630 )),
38631 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
38632 Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
38633 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
38634 ))
38635 }
38636 LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
38637 LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
38638 LOGGING_DATA_ACKED_DATA::ID => {
38639 Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
38640 }
38641 LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
38642 LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
38643 LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
38644 LOG_REQUEST_DATA_DATA::ID => {
38645 Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
38646 }
38647 LOG_REQUEST_END_DATA::ID => {
38648 Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
38649 }
38650 LOG_REQUEST_LIST_DATA::ID => {
38651 Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
38652 }
38653 MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
38654 MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
38655 MANUAL_SETPOINT_DATA::ID => {
38656 Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
38657 }
38658 MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
38659 MESSAGE_INTERVAL_DATA::ID => {
38660 Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
38661 }
38662 MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
38663 MISSION_CLEAR_ALL_DATA::ID => {
38664 Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
38665 }
38666 MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
38667 MISSION_CURRENT_DATA::ID => {
38668 Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
38669 }
38670 MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
38671 MISSION_ITEM_INT_DATA::ID => {
38672 Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
38673 }
38674 MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
38675 MISSION_ITEM_REACHED_DATA::default(),
38676 )),
38677 MISSION_REQUEST_DATA::ID => {
38678 Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
38679 }
38680 MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
38681 MISSION_REQUEST_INT_DATA::default(),
38682 )),
38683 MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
38684 MISSION_REQUEST_LIST_DATA::default(),
38685 )),
38686 MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
38687 MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
38688 )),
38689 MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
38690 MISSION_SET_CURRENT_DATA::default(),
38691 )),
38692 MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
38693 MISSION_WRITE_PARTIAL_LIST_DATA::default(),
38694 )),
38695 MOUNT_ORIENTATION_DATA::ID => {
38696 Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
38697 }
38698 NAMED_VALUE_FLOAT_DATA::ID => {
38699 Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
38700 }
38701 NAMED_VALUE_INT_DATA::ID => {
38702 Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
38703 }
38704 NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
38705 NAV_CONTROLLER_OUTPUT_DATA::default(),
38706 )),
38707 OBSTACLE_DISTANCE_DATA::ID => {
38708 Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
38709 }
38710 ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
38711 ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
38712 ONBOARD_COMPUTER_STATUS_DATA::default(),
38713 )),
38714 OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
38715 OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
38716 )),
38717 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
38718 OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
38719 )),
38720 OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
38721 OPEN_DRONE_ID_BASIC_ID_DATA::default(),
38722 )),
38723 OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
38724 OPEN_DRONE_ID_LOCATION_DATA::default(),
38725 )),
38726 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
38727 OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
38728 )),
38729 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
38730 OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
38731 )),
38732 OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
38733 OPEN_DRONE_ID_SELF_ID_DATA::default(),
38734 )),
38735 OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
38736 OPEN_DRONE_ID_SYSTEM_DATA::default(),
38737 )),
38738 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
38739 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
38740 )),
38741 OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
38742 OPTICAL_FLOW_RAD_DATA::ID => {
38743 Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
38744 }
38745 ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
38746 ORBIT_EXECUTION_STATUS_DATA::default(),
38747 )),
38748 PARAM_ERROR_DATA::ID => Some(Self::PARAM_ERROR(PARAM_ERROR_DATA::default())),
38749 PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
38750 PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
38751 PARAM_EXT_REQUEST_LIST_DATA::default(),
38752 )),
38753 PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
38754 PARAM_EXT_REQUEST_READ_DATA::default(),
38755 )),
38756 PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
38757 PARAM_EXT_VALUE_DATA::ID => {
38758 Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
38759 }
38760 PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
38761 PARAM_REQUEST_LIST_DATA::ID => {
38762 Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
38763 }
38764 PARAM_REQUEST_READ_DATA::ID => {
38765 Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
38766 }
38767 PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
38768 PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
38769 PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
38770 PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
38771 PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
38772 POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
38773 POSITION_TARGET_GLOBAL_INT_DATA::default(),
38774 )),
38775 POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
38776 POSITION_TARGET_LOCAL_NED_DATA::default(),
38777 )),
38778 POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
38779 PROTOCOL_VERSION_DATA::ID => {
38780 Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
38781 }
38782 RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
38783 RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
38784 RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
38785 RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
38786 RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
38787 RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
38788 RC_CHANNELS_OVERRIDE_DATA::default(),
38789 )),
38790 RC_CHANNELS_RAW_DATA::ID => {
38791 Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
38792 }
38793 RC_CHANNELS_SCALED_DATA::ID => {
38794 Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
38795 }
38796 REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
38797 REQUEST_DATA_STREAM_DATA::default(),
38798 )),
38799 REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
38800 RESOURCE_REQUEST_DATA::ID => {
38801 Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
38802 }
38803 RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
38804 RESPONSE_EVENT_ERROR_DATA::default(),
38805 )),
38806 SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
38807 SAFETY_ALLOWED_AREA_DATA::default(),
38808 )),
38809 SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
38810 SAFETY_SET_ALLOWED_AREA_DATA::default(),
38811 )),
38812 SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
38813 SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
38814 SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
38815 SCALED_PRESSURE_DATA::ID => {
38816 Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
38817 }
38818 SCALED_PRESSURE2_DATA::ID => {
38819 Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
38820 }
38821 SCALED_PRESSURE3_DATA::ID => {
38822 Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
38823 }
38824 SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
38825 SERVO_OUTPUT_RAW_DATA::ID => {
38826 Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
38827 }
38828 SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
38829 SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
38830 SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
38831 )),
38832 SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
38833 SET_ATTITUDE_TARGET_DATA::default(),
38834 )),
38835 SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
38836 SET_GPS_GLOBAL_ORIGIN_DATA::default(),
38837 )),
38838 SET_HOME_POSITION_DATA::ID => {
38839 Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
38840 }
38841 SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
38842 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
38843 SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
38844 )),
38845 SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
38846 SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
38847 )),
38848 SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
38849 SMART_BATTERY_INFO_DATA::ID => {
38850 Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
38851 }
38852 STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
38853 STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
38854 STORAGE_INFORMATION_DATA::default(),
38855 )),
38856 SUPPORTED_TUNES_DATA::ID => {
38857 Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
38858 }
38859 SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
38860 SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
38861 TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
38862 TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
38863 TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
38864 TERRAIN_REQUEST_DATA::ID => {
38865 Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
38866 }
38867 TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
38868 TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
38869 TIME_ESTIMATE_TO_TARGET_DATA::default(),
38870 )),
38871 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38872 Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
38873 TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
38874 ))
38875 }
38876 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38877 Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
38878 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
38879 ))
38880 }
38881 TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
38882 UAVCAN_NODE_INFO_DATA::ID => {
38883 Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
38884 }
38885 UAVCAN_NODE_STATUS_DATA::ID => {
38886 Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
38887 }
38888 UAVIONIX_ADSB_GET_DATA::ID => {
38889 Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::default()))
38890 }
38891 UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
38892 UAVIONIX_ADSB_OUT_CFG_DATA::default(),
38893 )),
38894 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
38895 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::default(),
38896 )),
38897 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
38898 Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
38899 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::default(),
38900 ))
38901 }
38902 UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
38903 UAVIONIX_ADSB_OUT_CONTROL_DATA::default(),
38904 )),
38905 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
38906 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::default(),
38907 )),
38908 UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
38909 UAVIONIX_ADSB_OUT_STATUS_DATA::default(),
38910 )),
38911 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
38912 Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
38913 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::default(),
38914 ))
38915 }
38916 UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
38917 UTM_GLOBAL_POSITION_DATA::default(),
38918 )),
38919 V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
38920 VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
38921 VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
38922 VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
38923 VICON_POSITION_ESTIMATE_DATA::default(),
38924 )),
38925 VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
38926 VIDEO_STREAM_INFORMATION_DATA::default(),
38927 )),
38928 VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
38929 VIDEO_STREAM_STATUS_DATA::default(),
38930 )),
38931 VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
38932 VISION_POSITION_ESTIMATE_DATA::default(),
38933 )),
38934 VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
38935 VISION_SPEED_ESTIMATE_DATA::default(),
38936 )),
38937 WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
38938 WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
38939 WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
38940 WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
38941 _ => None,
38942 }
38943 }
38944 #[cfg(feature = "arbitrary")]
38945 fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
38946 match id {
38947 ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
38948 ACTUATOR_CONTROL_TARGET_DATA::random(rng),
38949 )),
38950 ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
38951 ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
38952 )),
38953 ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
38954 AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::random(rng))),
38955 AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
38956 ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
38957 ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
38958 ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
38959 ATTITUDE_QUATERNION_DATA::random(rng),
38960 )),
38961 ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
38962 ATTITUDE_QUATERNION_COV_DATA::random(rng),
38963 )),
38964 ATTITUDE_TARGET_DATA::ID => {
38965 Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
38966 }
38967 ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
38968 AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
38969 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38970 Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
38971 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
38972 ))
38973 }
38974 AUTOPILOT_VERSION_DATA::ID => {
38975 Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
38976 }
38977 AVAILABLE_MODES_DATA::ID => {
38978 Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
38979 }
38980 AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
38981 AVAILABLE_MODES_MONITOR_DATA::random(rng),
38982 )),
38983 BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
38984 BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
38985 BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
38986 CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
38987 CAMERA_CAPTURE_STATUS_DATA::random(rng),
38988 )),
38989 CAMERA_FOV_STATUS_DATA::ID => {
38990 Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
38991 }
38992 CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
38993 CAMERA_IMAGE_CAPTURED_DATA::random(rng),
38994 )),
38995 CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
38996 CAMERA_INFORMATION_DATA::random(rng),
38997 )),
38998 CAMERA_SETTINGS_DATA::ID => {
38999 Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
39000 }
39001 CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
39002 CAMERA_THERMAL_RANGE_DATA::random(rng),
39003 )),
39004 CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
39005 CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
39006 )),
39007 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
39008 CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
39009 )),
39010 CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
39011 CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
39012 CAN_FILTER_MODIFY_DATA::ID => {
39013 Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
39014 }
39015 CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
39016 CELLULAR_CONFIG_DATA::ID => {
39017 Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
39018 }
39019 CELLULAR_STATUS_DATA::ID => {
39020 Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
39021 }
39022 CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
39023 CHANGE_OPERATOR_CONTROL_DATA::random(rng),
39024 )),
39025 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
39026 CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
39027 )),
39028 COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
39029 COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
39030 COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
39031 COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
39032 COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
39033 COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
39034 COMPONENT_INFORMATION_DATA::random(rng),
39035 )),
39036 COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
39037 COMPONENT_INFORMATION_BASIC_DATA::random(rng),
39038 )),
39039 COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
39040 COMPONENT_METADATA_DATA::random(rng),
39041 )),
39042 CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
39043 CONTROL_SYSTEM_STATE_DATA::random(rng),
39044 )),
39045 CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
39046 CURRENT_EVENT_SEQUENCE_DATA::random(rng),
39047 )),
39048 CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
39049 DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
39050 DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
39051 DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
39052 )),
39053 DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
39054 DEBUG_FLOAT_ARRAY_DATA::ID => {
39055 Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
39056 }
39057 DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
39058 DISTANCE_SENSOR_DATA::ID => {
39059 Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
39060 }
39061 EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
39062 ENCAPSULATED_DATA_DATA::ID => {
39063 Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
39064 }
39065 ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
39066 ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
39067 ESTIMATOR_STATUS_DATA::ID => {
39068 Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
39069 }
39070 EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
39071 EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
39072 EXTENDED_SYS_STATE_DATA::random(rng),
39073 )),
39074 FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
39075 FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
39076 FIGURE_EIGHT_EXECUTION_STATUS_DATA::random(rng),
39077 )),
39078 FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
39079 FILE_TRANSFER_PROTOCOL_DATA::random(rng),
39080 )),
39081 FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
39082 FLIGHT_INFORMATION_DATA::random(rng),
39083 )),
39084 FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
39085 FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
39086 GENERATOR_STATUS_DATA::ID => {
39087 Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
39088 }
39089 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
39090 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
39091 )),
39092 GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
39093 GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
39094 )),
39095 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
39096 GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
39097 )),
39098 GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
39099 GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
39100 )),
39101 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
39102 GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
39103 )),
39104 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
39105 Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
39106 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
39107 ))
39108 }
39109 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
39110 GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
39111 )),
39112 GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
39113 GIMBAL_MANAGER_STATUS_DATA::random(rng),
39114 )),
39115 GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
39116 GLOBAL_POSITION_INT_DATA::random(rng),
39117 )),
39118 GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
39119 GLOBAL_POSITION_INT_COV_DATA::random(rng),
39120 )),
39121 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
39122 Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
39123 GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
39124 ))
39125 }
39126 GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
39127 GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
39128 GPS_GLOBAL_ORIGIN_DATA::ID => {
39129 Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
39130 }
39131 GPS_INJECT_DATA_DATA::ID => {
39132 Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
39133 }
39134 GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
39135 GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
39136 GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
39137 GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
39138 GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
39139 HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
39140 HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
39141 HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
39142 HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
39143 HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
39144 HIL_ACTUATOR_CONTROLS_DATA::random(rng),
39145 )),
39146 HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
39147 HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
39148 HIL_OPTICAL_FLOW_DATA::ID => {
39149 Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
39150 }
39151 HIL_RC_INPUTS_RAW_DATA::ID => {
39152 Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
39153 }
39154 HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
39155 HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
39156 HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
39157 HIL_STATE_QUATERNION_DATA::random(rng),
39158 )),
39159 HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
39160 HYGROMETER_SENSOR_DATA::ID => {
39161 Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
39162 }
39163 ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
39164 ILLUMINATOR_STATUS_DATA::random(rng),
39165 )),
39166 ISBD_LINK_STATUS_DATA::ID => {
39167 Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
39168 }
39169 LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
39170 LINK_NODE_STATUS_DATA::ID => {
39171 Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
39172 }
39173 LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
39174 LOCAL_POSITION_NED_DATA::random(rng),
39175 )),
39176 LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
39177 LOCAL_POSITION_NED_COV_DATA::random(rng),
39178 )),
39179 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
39180 Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
39181 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
39182 ))
39183 }
39184 LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
39185 LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
39186 LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
39187 LOGGING_DATA_ACKED_DATA::random(rng),
39188 )),
39189 LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
39190 LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
39191 LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
39192 LOG_REQUEST_DATA_DATA::ID => {
39193 Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
39194 }
39195 LOG_REQUEST_END_DATA::ID => {
39196 Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
39197 }
39198 LOG_REQUEST_LIST_DATA::ID => {
39199 Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
39200 }
39201 MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
39202 MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
39203 MANUAL_SETPOINT_DATA::ID => {
39204 Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
39205 }
39206 MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
39207 MESSAGE_INTERVAL_DATA::ID => {
39208 Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
39209 }
39210 MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
39211 MISSION_CLEAR_ALL_DATA::ID => {
39212 Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
39213 }
39214 MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
39215 MISSION_CURRENT_DATA::ID => {
39216 Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
39217 }
39218 MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
39219 MISSION_ITEM_INT_DATA::ID => {
39220 Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
39221 }
39222 MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
39223 MISSION_ITEM_REACHED_DATA::random(rng),
39224 )),
39225 MISSION_REQUEST_DATA::ID => {
39226 Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
39227 }
39228 MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
39229 MISSION_REQUEST_INT_DATA::random(rng),
39230 )),
39231 MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
39232 MISSION_REQUEST_LIST_DATA::random(rng),
39233 )),
39234 MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
39235 MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
39236 )),
39237 MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
39238 MISSION_SET_CURRENT_DATA::random(rng),
39239 )),
39240 MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
39241 MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
39242 )),
39243 MOUNT_ORIENTATION_DATA::ID => {
39244 Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
39245 }
39246 NAMED_VALUE_FLOAT_DATA::ID => {
39247 Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
39248 }
39249 NAMED_VALUE_INT_DATA::ID => {
39250 Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
39251 }
39252 NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
39253 NAV_CONTROLLER_OUTPUT_DATA::random(rng),
39254 )),
39255 OBSTACLE_DISTANCE_DATA::ID => {
39256 Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
39257 }
39258 ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
39259 ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
39260 ONBOARD_COMPUTER_STATUS_DATA::random(rng),
39261 )),
39262 OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
39263 OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
39264 )),
39265 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
39266 OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
39267 )),
39268 OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
39269 OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
39270 )),
39271 OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
39272 OPEN_DRONE_ID_LOCATION_DATA::random(rng),
39273 )),
39274 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
39275 OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
39276 )),
39277 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
39278 OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
39279 )),
39280 OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
39281 OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
39282 )),
39283 OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
39284 OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
39285 )),
39286 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
39287 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
39288 )),
39289 OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
39290 OPTICAL_FLOW_RAD_DATA::ID => {
39291 Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
39292 }
39293 ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
39294 ORBIT_EXECUTION_STATUS_DATA::random(rng),
39295 )),
39296 PARAM_ERROR_DATA::ID => Some(Self::PARAM_ERROR(PARAM_ERROR_DATA::random(rng))),
39297 PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
39298 PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
39299 PARAM_EXT_REQUEST_LIST_DATA::random(rng),
39300 )),
39301 PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
39302 PARAM_EXT_REQUEST_READ_DATA::random(rng),
39303 )),
39304 PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
39305 PARAM_EXT_VALUE_DATA::ID => {
39306 Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
39307 }
39308 PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
39309 PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
39310 PARAM_REQUEST_LIST_DATA::random(rng),
39311 )),
39312 PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
39313 PARAM_REQUEST_READ_DATA::random(rng),
39314 )),
39315 PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
39316 PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
39317 PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
39318 PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
39319 PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
39320 POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
39321 POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
39322 )),
39323 POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
39324 POSITION_TARGET_LOCAL_NED_DATA::random(rng),
39325 )),
39326 POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
39327 PROTOCOL_VERSION_DATA::ID => {
39328 Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
39329 }
39330 RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
39331 RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
39332 RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
39333 RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
39334 RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
39335 RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
39336 RC_CHANNELS_OVERRIDE_DATA::random(rng),
39337 )),
39338 RC_CHANNELS_RAW_DATA::ID => {
39339 Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
39340 }
39341 RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
39342 RC_CHANNELS_SCALED_DATA::random(rng),
39343 )),
39344 REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
39345 REQUEST_DATA_STREAM_DATA::random(rng),
39346 )),
39347 REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
39348 RESOURCE_REQUEST_DATA::ID => {
39349 Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
39350 }
39351 RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
39352 RESPONSE_EVENT_ERROR_DATA::random(rng),
39353 )),
39354 SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
39355 SAFETY_ALLOWED_AREA_DATA::random(rng),
39356 )),
39357 SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
39358 SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
39359 )),
39360 SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
39361 SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
39362 SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
39363 SCALED_PRESSURE_DATA::ID => {
39364 Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
39365 }
39366 SCALED_PRESSURE2_DATA::ID => {
39367 Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
39368 }
39369 SCALED_PRESSURE3_DATA::ID => {
39370 Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
39371 }
39372 SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
39373 SERVO_OUTPUT_RAW_DATA::ID => {
39374 Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
39375 }
39376 SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
39377 SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
39378 SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
39379 )),
39380 SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
39381 SET_ATTITUDE_TARGET_DATA::random(rng),
39382 )),
39383 SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
39384 SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
39385 )),
39386 SET_HOME_POSITION_DATA::ID => {
39387 Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
39388 }
39389 SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
39390 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
39391 SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
39392 )),
39393 SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
39394 SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
39395 )),
39396 SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
39397 SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
39398 SMART_BATTERY_INFO_DATA::random(rng),
39399 )),
39400 STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
39401 STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
39402 STORAGE_INFORMATION_DATA::random(rng),
39403 )),
39404 SUPPORTED_TUNES_DATA::ID => {
39405 Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
39406 }
39407 SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
39408 SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
39409 TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
39410 TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
39411 TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
39412 TERRAIN_REQUEST_DATA::ID => {
39413 Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
39414 }
39415 TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
39416 TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
39417 TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
39418 )),
39419 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
39420 Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
39421 TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
39422 ))
39423 }
39424 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
39425 Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
39426 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
39427 ))
39428 }
39429 TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
39430 UAVCAN_NODE_INFO_DATA::ID => {
39431 Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
39432 }
39433 UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
39434 UAVCAN_NODE_STATUS_DATA::random(rng),
39435 )),
39436 UAVIONIX_ADSB_GET_DATA::ID => {
39437 Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::random(rng)))
39438 }
39439 UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
39440 UAVIONIX_ADSB_OUT_CFG_DATA::random(rng),
39441 )),
39442 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
39443 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::random(rng),
39444 )),
39445 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
39446 Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
39447 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::random(rng),
39448 ))
39449 }
39450 UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
39451 UAVIONIX_ADSB_OUT_CONTROL_DATA::random(rng),
39452 )),
39453 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
39454 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::random(rng),
39455 )),
39456 UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
39457 UAVIONIX_ADSB_OUT_STATUS_DATA::random(rng),
39458 )),
39459 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
39460 Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
39461 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::random(rng),
39462 ))
39463 }
39464 UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
39465 UTM_GLOBAL_POSITION_DATA::random(rng),
39466 )),
39467 V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
39468 VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
39469 VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
39470 VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
39471 VICON_POSITION_ESTIMATE_DATA::random(rng),
39472 )),
39473 VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
39474 VIDEO_STREAM_INFORMATION_DATA::random(rng),
39475 )),
39476 VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
39477 VIDEO_STREAM_STATUS_DATA::random(rng),
39478 )),
39479 VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
39480 VISION_POSITION_ESTIMATE_DATA::random(rng),
39481 )),
39482 VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
39483 VISION_SPEED_ESTIMATE_DATA::random(rng),
39484 )),
39485 WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
39486 WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
39487 WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
39488 WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
39489 _ => None,
39490 }
39491 }
39492 fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
39493 match self {
39494 Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
39495 Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
39496 Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
39497 Self::AIRSPEED(body) => body.ser(version, bytes),
39498 Self::AIS_VESSEL(body) => body.ser(version, bytes),
39499 Self::ALTITUDE(body) => body.ser(version, bytes),
39500 Self::ATTITUDE(body) => body.ser(version, bytes),
39501 Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
39502 Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
39503 Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
39504 Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
39505 Self::AUTH_KEY(body) => body.ser(version, bytes),
39506 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
39507 Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
39508 Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
39509 Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
39510 Self::BATTERY_INFO(body) => body.ser(version, bytes),
39511 Self::BATTERY_STATUS(body) => body.ser(version, bytes),
39512 Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
39513 Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
39514 Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
39515 Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
39516 Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
39517 Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
39518 Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
39519 Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
39520 Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
39521 Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
39522 Self::CANFD_FRAME(body) => body.ser(version, bytes),
39523 Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
39524 Self::CAN_FRAME(body) => body.ser(version, bytes),
39525 Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
39526 Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
39527 Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
39528 Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
39529 Self::COLLISION(body) => body.ser(version, bytes),
39530 Self::COMMAND_ACK(body) => body.ser(version, bytes),
39531 Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
39532 Self::COMMAND_INT(body) => body.ser(version, bytes),
39533 Self::COMMAND_LONG(body) => body.ser(version, bytes),
39534 Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
39535 Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
39536 Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
39537 Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
39538 Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
39539 Self::CURRENT_MODE(body) => body.ser(version, bytes),
39540 Self::DATA_STREAM(body) => body.ser(version, bytes),
39541 Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
39542 Self::DEBUG(body) => body.ser(version, bytes),
39543 Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
39544 Self::DEBUG_VECT(body) => body.ser(version, bytes),
39545 Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
39546 Self::EFI_STATUS(body) => body.ser(version, bytes),
39547 Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
39548 Self::ESC_INFO(body) => body.ser(version, bytes),
39549 Self::ESC_STATUS(body) => body.ser(version, bytes),
39550 Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
39551 Self::EVENT(body) => body.ser(version, bytes),
39552 Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
39553 Self::FENCE_STATUS(body) => body.ser(version, bytes),
39554 Self::FIGURE_EIGHT_EXECUTION_STATUS(body) => body.ser(version, bytes),
39555 Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
39556 Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
39557 Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
39558 Self::FUEL_STATUS(body) => body.ser(version, bytes),
39559 Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
39560 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
39561 Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
39562 Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
39563 Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
39564 Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
39565 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
39566 Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
39567 Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
39568 Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
39569 Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
39570 Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
39571 Self::GPS2_RAW(body) => body.ser(version, bytes),
39572 Self::GPS2_RTK(body) => body.ser(version, bytes),
39573 Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
39574 Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
39575 Self::GPS_INPUT(body) => body.ser(version, bytes),
39576 Self::GPS_RAW_INT(body) => body.ser(version, bytes),
39577 Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
39578 Self::GPS_RTK(body) => body.ser(version, bytes),
39579 Self::GPS_STATUS(body) => body.ser(version, bytes),
39580 Self::HEARTBEAT(body) => body.ser(version, bytes),
39581 Self::HIGHRES_IMU(body) => body.ser(version, bytes),
39582 Self::HIGH_LATENCY(body) => body.ser(version, bytes),
39583 Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
39584 Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
39585 Self::HIL_CONTROLS(body) => body.ser(version, bytes),
39586 Self::HIL_GPS(body) => body.ser(version, bytes),
39587 Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
39588 Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
39589 Self::HIL_SENSOR(body) => body.ser(version, bytes),
39590 Self::HIL_STATE(body) => body.ser(version, bytes),
39591 Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
39592 Self::HOME_POSITION(body) => body.ser(version, bytes),
39593 Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
39594 Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
39595 Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
39596 Self::LANDING_TARGET(body) => body.ser(version, bytes),
39597 Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
39598 Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
39599 Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
39600 Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
39601 Self::LOGGING_ACK(body) => body.ser(version, bytes),
39602 Self::LOGGING_DATA(body) => body.ser(version, bytes),
39603 Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
39604 Self::LOG_DATA(body) => body.ser(version, bytes),
39605 Self::LOG_ENTRY(body) => body.ser(version, bytes),
39606 Self::LOG_ERASE(body) => body.ser(version, bytes),
39607 Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
39608 Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
39609 Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
39610 Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
39611 Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
39612 Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
39613 Self::MEMORY_VECT(body) => body.ser(version, bytes),
39614 Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
39615 Self::MISSION_ACK(body) => body.ser(version, bytes),
39616 Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
39617 Self::MISSION_COUNT(body) => body.ser(version, bytes),
39618 Self::MISSION_CURRENT(body) => body.ser(version, bytes),
39619 Self::MISSION_ITEM(body) => body.ser(version, bytes),
39620 Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
39621 Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
39622 Self::MISSION_REQUEST(body) => body.ser(version, bytes),
39623 Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
39624 Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
39625 Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
39626 Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
39627 Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
39628 Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
39629 Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
39630 Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
39631 Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
39632 Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
39633 Self::ODOMETRY(body) => body.ser(version, bytes),
39634 Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
39635 Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
39636 Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
39637 Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
39638 Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
39639 Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
39640 Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
39641 Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
39642 Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
39643 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
39644 Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
39645 Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
39646 Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
39647 Self::PARAM_ERROR(body) => body.ser(version, bytes),
39648 Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
39649 Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
39650 Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
39651 Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
39652 Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
39653 Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
39654 Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
39655 Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
39656 Self::PARAM_SET(body) => body.ser(version, bytes),
39657 Self::PARAM_VALUE(body) => body.ser(version, bytes),
39658 Self::PING(body) => body.ser(version, bytes),
39659 Self::PLAY_TUNE(body) => body.ser(version, bytes),
39660 Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
39661 Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
39662 Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
39663 Self::POWER_STATUS(body) => body.ser(version, bytes),
39664 Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
39665 Self::RADIO_STATUS(body) => body.ser(version, bytes),
39666 Self::RAW_IMU(body) => body.ser(version, bytes),
39667 Self::RAW_PRESSURE(body) => body.ser(version, bytes),
39668 Self::RAW_RPM(body) => body.ser(version, bytes),
39669 Self::RC_CHANNELS(body) => body.ser(version, bytes),
39670 Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
39671 Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
39672 Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
39673 Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
39674 Self::REQUEST_EVENT(body) => body.ser(version, bytes),
39675 Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
39676 Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
39677 Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
39678 Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
39679 Self::SCALED_IMU(body) => body.ser(version, bytes),
39680 Self::SCALED_IMU2(body) => body.ser(version, bytes),
39681 Self::SCALED_IMU3(body) => body.ser(version, bytes),
39682 Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
39683 Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
39684 Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
39685 Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
39686 Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
39687 Self::SETUP_SIGNING(body) => body.ser(version, bytes),
39688 Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
39689 Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
39690 Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
39691 Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
39692 Self::SET_MODE(body) => body.ser(version, bytes),
39693 Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
39694 Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
39695 Self::SIM_STATE(body) => body.ser(version, bytes),
39696 Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
39697 Self::STATUSTEXT(body) => body.ser(version, bytes),
39698 Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
39699 Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
39700 Self::SYSTEM_TIME(body) => body.ser(version, bytes),
39701 Self::SYS_STATUS(body) => body.ser(version, bytes),
39702 Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
39703 Self::TERRAIN_DATA(body) => body.ser(version, bytes),
39704 Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
39705 Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
39706 Self::TIMESYNC(body) => body.ser(version, bytes),
39707 Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
39708 Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
39709 Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
39710 Self::TUNNEL(body) => body.ser(version, bytes),
39711 Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
39712 Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
39713 Self::UAVIONIX_ADSB_GET(body) => body.ser(version, bytes),
39714 Self::UAVIONIX_ADSB_OUT_CFG(body) => body.ser(version, bytes),
39715 Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(body) => body.ser(version, bytes),
39716 Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(body) => body.ser(version, bytes),
39717 Self::UAVIONIX_ADSB_OUT_CONTROL(body) => body.ser(version, bytes),
39718 Self::UAVIONIX_ADSB_OUT_DYNAMIC(body) => body.ser(version, bytes),
39719 Self::UAVIONIX_ADSB_OUT_STATUS(body) => body.ser(version, bytes),
39720 Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(body) => body.ser(version, bytes),
39721 Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
39722 Self::V2_EXTENSION(body) => body.ser(version, bytes),
39723 Self::VFR_HUD(body) => body.ser(version, bytes),
39724 Self::VIBRATION(body) => body.ser(version, bytes),
39725 Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
39726 Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
39727 Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
39728 Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
39729 Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
39730 Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
39731 Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
39732 Self::WINCH_STATUS(body) => body.ser(version, bytes),
39733 Self::WIND_COV(body) => body.ser(version, bytes),
39734 }
39735 }
39736 fn extra_crc(id: u32) -> u8 {
39737 match id {
39738 ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
39739 ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
39740 ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
39741 AIRSPEED_DATA::ID => AIRSPEED_DATA::EXTRA_CRC,
39742 AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
39743 ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
39744 ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
39745 ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
39746 ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
39747 ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
39748 ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
39749 AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
39750 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
39751 AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
39752 }
39753 AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
39754 AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
39755 AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
39756 BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
39757 BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
39758 BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
39759 CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
39760 CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
39761 CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
39762 CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
39763 CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
39764 CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
39765 CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
39766 CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
39767 CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
39768 CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
39769 CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
39770 CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
39771 CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
39772 CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
39773 CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
39774 CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
39775 COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
39776 COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
39777 COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
39778 COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
39779 COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
39780 COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
39781 COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
39782 COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
39783 CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
39784 CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
39785 CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
39786 DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
39787 DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
39788 DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
39789 DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
39790 DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
39791 DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
39792 EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
39793 ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
39794 ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
39795 ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
39796 ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
39797 EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
39798 EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
39799 FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
39800 FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => FIGURE_EIGHT_EXECUTION_STATUS_DATA::EXTRA_CRC,
39801 FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
39802 FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
39803 FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
39804 FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
39805 GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
39806 GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
39807 GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
39808 GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
39809 GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
39810 GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
39811 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
39812 GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
39813 }
39814 GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
39815 GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
39816 GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
39817 GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
39818 GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
39819 GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
39820 }
39821 GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
39822 GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
39823 GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
39824 GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
39825 GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
39826 GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
39827 GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
39828 GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
39829 GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
39830 HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
39831 HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
39832 HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
39833 HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
39834 HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
39835 HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
39836 HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
39837 HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
39838 HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
39839 HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
39840 HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
39841 HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
39842 HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
39843 HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
39844 ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
39845 ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
39846 LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
39847 LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
39848 LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
39849 LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
39850 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
39851 LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
39852 }
39853 LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
39854 LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
39855 LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
39856 LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
39857 LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
39858 LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
39859 LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
39860 LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
39861 LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
39862 MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
39863 MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
39864 MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
39865 MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
39866 MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
39867 MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
39868 MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
39869 MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
39870 MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
39871 MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
39872 MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
39873 MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
39874 MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
39875 MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
39876 MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
39877 MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
39878 MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
39879 MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
39880 MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
39881 NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
39882 NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
39883 NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
39884 OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
39885 ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
39886 ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
39887 OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
39888 OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
39889 OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
39890 OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
39891 OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
39892 OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
39893 OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
39894 OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
39895 OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
39896 OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
39897 OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
39898 ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
39899 PARAM_ERROR_DATA::ID => PARAM_ERROR_DATA::EXTRA_CRC,
39900 PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
39901 PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
39902 PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
39903 PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
39904 PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
39905 PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
39906 PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
39907 PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
39908 PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
39909 PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
39910 PING_DATA::ID => PING_DATA::EXTRA_CRC,
39911 PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
39912 PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
39913 POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
39914 POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
39915 POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
39916 PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
39917 RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
39918 RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
39919 RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
39920 RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
39921 RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
39922 RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
39923 RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
39924 RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
39925 REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
39926 REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
39927 RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
39928 RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
39929 SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
39930 SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
39931 SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
39932 SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
39933 SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
39934 SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
39935 SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
39936 SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
39937 SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
39938 SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
39939 SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
39940 SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
39941 SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
39942 SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
39943 SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
39944 SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
39945 SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
39946 SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
39947 }
39948 SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
39949 SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
39950 SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
39951 STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
39952 STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
39953 SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
39954 SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
39955 SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
39956 TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
39957 TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
39958 TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
39959 TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
39960 TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
39961 TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
39962 TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
39963 TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
39964 }
39965 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
39966 TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
39967 }
39968 TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
39969 UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
39970 UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
39971 UAVIONIX_ADSB_GET_DATA::ID => UAVIONIX_ADSB_GET_DATA::EXTRA_CRC,
39972 UAVIONIX_ADSB_OUT_CFG_DATA::ID => UAVIONIX_ADSB_OUT_CFG_DATA::EXTRA_CRC,
39973 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
39974 UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::EXTRA_CRC
39975 }
39976 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
39977 UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::EXTRA_CRC
39978 }
39979 UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => UAVIONIX_ADSB_OUT_CONTROL_DATA::EXTRA_CRC,
39980 UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::EXTRA_CRC,
39981 UAVIONIX_ADSB_OUT_STATUS_DATA::ID => UAVIONIX_ADSB_OUT_STATUS_DATA::EXTRA_CRC,
39982 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
39983 UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::EXTRA_CRC
39984 }
39985 UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
39986 V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
39987 VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
39988 VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
39989 VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
39990 VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
39991 VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
39992 VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
39993 VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
39994 WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
39995 WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
39996 WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
39997 WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
39998 _ => 0,
39999 }
40000 }
40001 fn target_system_id(&self) -> Option<u8> {
40002 match self {
40003 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
40004 Self::CANFD_FRAME(inner) => Some(inner.target_system),
40005 Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
40006 Self::CAN_FRAME(inner) => Some(inner.target_system),
40007 Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
40008 Self::COMMAND_ACK(inner) => Some(inner.target_system),
40009 Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
40010 Self::COMMAND_INT(inner) => Some(inner.target_system),
40011 Self::COMMAND_LONG(inner) => Some(inner.target_system),
40012 Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
40013 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
40014 Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
40015 Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
40016 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
40017 Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
40018 Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
40019 Self::LOGGING_ACK(inner) => Some(inner.target_system),
40020 Self::LOGGING_DATA(inner) => Some(inner.target_system),
40021 Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
40022 Self::LOG_ERASE(inner) => Some(inner.target_system),
40023 Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
40024 Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
40025 Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
40026 Self::MISSION_ACK(inner) => Some(inner.target_system),
40027 Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
40028 Self::MISSION_COUNT(inner) => Some(inner.target_system),
40029 Self::MISSION_ITEM(inner) => Some(inner.target_system),
40030 Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
40031 Self::MISSION_REQUEST(inner) => Some(inner.target_system),
40032 Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
40033 Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
40034 Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
40035 Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
40036 Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
40037 Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
40038 Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
40039 Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
40040 Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
40041 Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
40042 Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
40043 Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
40044 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
40045 Self::PARAM_ERROR(inner) => Some(inner.target_system),
40046 Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
40047 Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
40048 Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
40049 Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
40050 Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
40051 Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
40052 Self::PARAM_SET(inner) => Some(inner.target_system),
40053 Self::PING(inner) => Some(inner.target_system),
40054 Self::PLAY_TUNE(inner) => Some(inner.target_system),
40055 Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
40056 Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
40057 Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
40058 Self::REQUEST_EVENT(inner) => Some(inner.target_system),
40059 Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
40060 Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
40061 Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
40062 Self::SETUP_SIGNING(inner) => Some(inner.target_system),
40063 Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
40064 Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
40065 Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
40066 Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
40067 Self::SET_MODE(inner) => Some(inner.target_system),
40068 Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
40069 Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
40070 Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
40071 Self::TIMESYNC(inner) => Some(inner.target_system),
40072 Self::TUNNEL(inner) => Some(inner.target_system),
40073 Self::V2_EXTENSION(inner) => Some(inner.target_system),
40074 _ => None,
40075 }
40076 }
40077 fn target_component_id(&self) -> Option<u8> {
40078 match self {
40079 Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
40080 Self::CANFD_FRAME(inner) => Some(inner.target_component),
40081 Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
40082 Self::CAN_FRAME(inner) => Some(inner.target_component),
40083 Self::COMMAND_ACK(inner) => Some(inner.target_component),
40084 Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
40085 Self::COMMAND_INT(inner) => Some(inner.target_component),
40086 Self::COMMAND_LONG(inner) => Some(inner.target_component),
40087 Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
40088 Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
40089 Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
40090 Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
40091 Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
40092 Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
40093 Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
40094 Self::LOGGING_ACK(inner) => Some(inner.target_component),
40095 Self::LOGGING_DATA(inner) => Some(inner.target_component),
40096 Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
40097 Self::LOG_ERASE(inner) => Some(inner.target_component),
40098 Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
40099 Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
40100 Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
40101 Self::MISSION_ACK(inner) => Some(inner.target_component),
40102 Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
40103 Self::MISSION_COUNT(inner) => Some(inner.target_component),
40104 Self::MISSION_ITEM(inner) => Some(inner.target_component),
40105 Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
40106 Self::MISSION_REQUEST(inner) => Some(inner.target_component),
40107 Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
40108 Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
40109 Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
40110 Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
40111 Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
40112 Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
40113 Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
40114 Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
40115 Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
40116 Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
40117 Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
40118 Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
40119 Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
40120 Self::PARAM_ERROR(inner) => Some(inner.target_component),
40121 Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
40122 Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
40123 Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
40124 Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
40125 Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
40126 Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
40127 Self::PARAM_SET(inner) => Some(inner.target_component),
40128 Self::PING(inner) => Some(inner.target_component),
40129 Self::PLAY_TUNE(inner) => Some(inner.target_component),
40130 Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
40131 Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
40132 Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
40133 Self::REQUEST_EVENT(inner) => Some(inner.target_component),
40134 Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
40135 Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
40136 Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
40137 Self::SETUP_SIGNING(inner) => Some(inner.target_component),
40138 Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
40139 Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
40140 Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
40141 Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
40142 Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
40143 Self::TIMESYNC(inner) => Some(inner.target_component),
40144 Self::TUNNEL(inner) => Some(inner.target_component),
40145 Self::V2_EXTENSION(inner) => Some(inner.target_component),
40146 _ => None,
40147 }
40148 }
40149}